Red Gregory

View Original

Notion Creatives: Convert RGB To HEX And Vice Versa

See this content in the original post

How To Copy Formulas

  • Click inside cell

  • Click out (cell should be blue)

  • Copy + Paste where desired

Notion Formula Tips

These tips explain how to separate values in a list of three, divided by a comma (ie. the RGB syntax 220, 20, 60).

Removing numbers in the sequence:

1. Remove First Number

replace(prop("RGB"), "[^,]*, ", "")

2. Remove Middle Number

replace(prop("RGB"), ",[^,]*", "")

3. Remove Last Number

replace(prop("RGB"), ",[^,]*$", "")

Isolating numbers in the sequence:

1. Isolate First Number

replaceAll(replace(prop("RGB"), "(?:[^,]*, ){0}", ""), ",.*", "")

2. Isolate Second Number

replaceAll(replace(prop("RGB"), "(?:[^,]*, ){1}", ""), ",.*", "")

3. Isolate Third Number

replaceAll(replace(prop("RGB"), "(?:[^,]*, ){2}", ""), ",.*", "")


See this gallery in the original post