Monochrome Achievement
How we detect gifts where model blends with backdrop
Monochrome achievement is awarded to gifts where the model visually blends with the backdrop due to similar colors. This creates a unique aesthetic where the model appears to merge with its background, rather than standing out.
Model Classification
First, we classify each model as monochromatic or not. This flag is stored in the database and set in two stages:
Color Data Storage
For each model and backdrop, we store color information in multiple formats:
| Field | Example | Description |
|---|---|---|
| color_hex | #4A90D9 | Original hex color from sprite/first animation frame or averaged gradient color |
| oklch_l | 0.62 | Lightness in OKLCH (0-1) |
| oklch_c | 0.12 | Chroma/saturation in OKLCH |
| oklch_h | 245Β° | Hue angle in degrees |
Color Space Conversion
To compare colors perceptually, we convert hex colors to OKLab color space:
Color Similarity Check
Finally, we compare model and backdrop colors using three rules:
C < 0.03ΞE < 0.162ΞΞΈ < 30Β°OKLab is a perceptually uniform color space β distances correspond to how humans perceive color differences.
- RGB distance doesn't match human perception
- OKLab treats all hues equally
- Better for detecting subtle color matches
Models are classified as monochrome or not based on their visual characteristics:
monochrome = TRUE#4A90D9monochrome = FALSEEven with a monochrome model, the gift only earns the achievement if backdrop color matches:
#4A90D9#3B82F6#4A90D9#F97316Same monochrome model, but orange backdrop creates too much contrast in OKLab space
A gift receives Monochrome achievement when its model is flagged as monochromatic AND the model's color closely matches the backdrop's color in OKLab space. This ensures the visual "blending" effect is actually perceptible.
Β Β AND oklab_similar(model.color, backdrop.color)
then award "Monochrome"