Define color using RGB or Hex

A color can be defined in more than just one way, and Colors Coder provides you with different options to do so. It's possible to type or paste the following values:

  • Red - Green - Blue (RGB) as 0-255 values
  • Red - Green - Blue (RGB) as floating point values (0.0 - 1.0)
  • Hexadecimal (hex) value (# symbol should not be typed)

* To switch between 0-255 and floating point values, check or uncheck the box titled "Show as floating point values (0.0 - 1.0)".

Additionally, there are color sliders that you can use when changing RGB value. Color sample on the left is being updated in real time while sliding.

Alpha can be updated similarly to RGB values. Type the desired alpha value, or just use the slider to change it (0.0 - 1.0).

Pick a color

Moreover, by clicking on the color sample the macOS familiar Colors panel shows up, where colors can be chosen from existing palettes, pencils, wheel, etc.

More than the default color profile

Colors Coder allows you to change the default color profile. Provided options include:

  • Generic RGB
  • sRGB IEC61966-2.1
  • Display P3
Note that there is no distinction between Generic RGB and sRGB in iOS, sRGB is the default color space. That distintion is meaningful in macOS apps only. Display P3 is an option for all OS.

Colors need...

... names

All colors created or imported to Colors Coder must have names, and not just that! Naming must follow all conventions that apply to Swift variables, as each color name becomes a variable name when code is generated.

Worry not though! Colors Coder will let you know if a color name is invalid upon saving it, so you'll have your chance to fix it before exporting any code.

... and collections

Besides naming, colors must be assigned to collections. So, if there are multiple collections in your document, choose the appropriate one for your color. Keep in mind that if you are editing a color and select a different collection than the default one, the color will be moved to that collection.