Api Colours

Posts: 1 · Views: 41
  • 38919

    Looking at the api documentation and the colour filter when searching, it seems there are 29 different colors that wh reports.

    But using this tool to generate types from example data, I got

    export type Color =
        | '#000000'
        | '#424153'
        | '#660000'
        | '#999999'
        | '#cccccc'
        | '#abbcda'
        | '#ffffff'
        | '#996633'
        | '#333399'
        | '#e7d8b1'
        | '#663300'
        | '#cc6633'
        | '#663399'
        | '#66cccc'
        | '#0066cc'
        | '#0099cc'
        | '#fdadc7'
        | '#336600'
        | '#cc3333'
        | '#990000'
        | '#cc0000'
        | '#cccc33'
        | '#ea4c88'
        | '#ffcc33'
        | '#993399'
        | '#ffff00'
        | '#ff6600'
        | '#77cc33'
        | '#ff9900'
        | '#666600'
        | '#f5dd01'
        | '#999900'

    Which included the following extra colors, in addition to the documented colours:

    • #abbcda
    • #e7d8b1
    • #fdadc7
    • #f5dd01

    Does this mean that wallhaven sometimes returns arbitrary colours instead of the ones listed? Should I then be using a string type to represent a wallpaper colour instead of an enum?

    Last updated

Message