cmap_builder.utils.rgb_from_name

cmap_builder.utils.rgb_from_name(named_color_ref)

Returns the RGB values of a named color (in the 0-1 range). The color name supports the following color modifiers suffixes:

  • “_l#”: HLS lightness (L) modifier (0 to 100 range). For example, “yellow_l75” changes the lightness to 0.75.

  • “_s#”: HSV saturation (S) modifier (0 to 100 range). For example, “yellow_s75” changes the saturation to 0.75.

  • “_v#”: HSV value (V, or brightness) modifier (0 to 100 range). For example, “yellow_v75” changes the brightness (value) to 0.75.

  • “_light”: Make color lighter. Same as the “_l10” modifier.

  • “_dark”: Make color darker. Same as the “_l80” modifier.