Skip to content

Replace color palette SVG with reference table

Fionn Kelleher requested to merge osslate/hig-www:color-ref-table into master

This MR fixes #96 (closed).

Current This MR
image image

The approach I took was to add a new, local Sphinx extension (hig_palette) to conf.py which:

  • reads hig_palette_colors_rgb -- a map of Name -> (R, G, B) -- from conf.py

  • allows the use of three new roles that work as follows:

    :palette-hex:`Green 3`   -> #33d17a
    :palette-rgb:`Light 2`    -> (222, 221, 218)
    :palette-svg:`Purple 4`   -> filled rect of Purple 4 in an SVG

:palette-svg: is used for the color sample you see in the first column of the table.

Edited by Fionn Kelleher

Merge request reports