Methods · Version 1.5

How the Palette & Value Finder works

This page documents the implementation supplied with the Finder. The educational concepts come from the linked sources; sampling, palette selection, value numbering and interface choices are Vault Canvas implementation decisions.

← Return to the Palette & Value Finder

Image handling and privacy

JPEG, PNG and WebP files are decoded by the browser. Files over 20 MB or decoded images over 40 megapixels are rejected. The image is reduced to a maximum longest edge of 720 pixels, preserving its proportions. Browser decoding and colour management affect the resulting sRGB canvas pixels. Transparency is composited onto white. No image data leaves this application; visiting external links is a separate action.

Representative colours

Every fourth pixel of the reduced image is sampled. Deterministic farthest-point initialisation selects up to the requested number of starting centres. Sixteen iterations assign sampled pixels to the closest centre using squared Euclidean distance in encoded RGB and replace each centre with its group mean. Empty groups are removed; colours are sorted by approximate sample share. A uniform image can return fewer colours than requested.

This compact method favours large regions, is not perceptually uniform clustering, and may miss small accents. It does not identify objects, pigments or artistic importance. Resizing, sampling and compression can change the result. Swatch edits change only the reference palette. Edited or picked colours have no coverage percentage.

Colour variety, picking and selected areas

Overall palette retains the original RGB clustering. Colour variety first clusters into up to max(24, three times the requested candidate count) colours, then greedily selects candidates spread apart in CIELAB space, with a small sample-share weighting (share to the power 0.15). It begins with the largest cluster. This is a heuristic for diversity, not object recognition or a guarantee of every hue. Neutrals remain eligible; dark or subtle accents may still be missed.

Locked colours are retained during regeneration; new candidates close to a locked colour in each Lab coordinate are skipped. Reducing the count below the number locked restores the count to that number. Coverage is recalculated by assigning every fourth sampled pixel to its nearest final palette colour in encoded RGB. Thus coverage reflects representative groups rather than exact matching pixels. Picked and edited swatches show no percentage. Picking locks that swatch automatically. Changing the extraction mode or count preserves locked colours; loading a new image, applying a selected area or restoring the whole image resets the palette.

The image picker samples a pixel of the reduced reference and has a magnified preview. Area selection crops the current view for all three displays and extraction; Use whole image restores the retained reduced original. Exports use the current selected area. The full-resolution source is not retained.

Greyscale calculation

For each sRGB channel c normalised to 0–1, linearise using c/12.92 when c ≤ 0.04045, otherwise ((c + 0.055)/1.055)^2.4. Relative luminance is Y = 0.2126R + 0.7152G + 0.0722B, following W3C’s definition. Encode Y back to sRGB using 12.92Y for Y ≤ 0.0031308, otherwise 1.055Y^(1/2.4) − 0.055. Round the result to an 8-bit grey g.

The displayed value number is 9 × (1 − g/255), rounded to one decimal place. White is 0; black is 9. Higher numbers indicate darker tones. It is an approximate encoded display-grey scale. It is not CIELAB lightness, a measured reflectance, or a calibrated Munsell value.

Stepped values

For n = 3, 5 or 9, the displayed grey becomes round((g/255)(n−1)) × 255/(n−1), rounded to the nearest byte. The bands are uniformly spaced in encoded grey, with fixed thresholds independent of the image histogram. They are not equal-area groups, perceptually calibrated intervals or an automatic Notan composition. A simple image need not occupy every band.

Paint guidance and studio connections

CMY and Traditional options provide visible per-swatch starting suggestions based on simple RGB hue-family and near-neutral classification. The same broad advice is shared by many colours; it is not a pigment model. They do not calculate pigment recipes or change the extracted palette. Links open the existing studios without transferring colours: the studios’ import interface has not been verified. HEX codes can be selected and copied manually. No RGB arithmetic is presented as a physical-paint simulation.

Exports and practical limits

The PNG and PDF references contain all three views, every numbered swatch with its HEX code, display value, estimated coverage where applicable (picked and edited swatches are labelled instead), the selected mixing approach with its per-swatch starting suggestions, the value-scale explanation, a screen-versus-paint note, the version number and the tool URL. Separate buttons export the greyscale image and the current value study as clean PNGs at the analysis resolution, without page furniture. The print view uses the browser print dialog. No export reproduces the original full-resolution photograph. Displays, printers, lighting, supports, paint opacity and dried pigment behaviour all affect the result. Use the analysis to compare relationships and test mixtures with actual materials.

Research behind the ideas

These sources explain the scientific and computational background. Some support calculations used here; others are related research or further reading. They were checked on 3 November 2026. They do not validate this application, its suggested paint combinations or its usefulness for every artist.

1. Reducing an image to a small palette

Paul Heckbert described colour-image quantisation as sampling image statistics, choosing a palette and mapping image colours to palette entries. This provides useful background for understanding representative swatches and the colour-location display. His paper’s quantisation algorithms are not the algorithm implemented in this Finder. Our RGB clustering, starting-centre selection and diversity settings are our own implementation choices. [R1]

2. Comparing colours more meaningfully

The International Commission on Illumination (CIE) defines CIELAB as an approximately uniform colour space. The Finder uses a conversion to Lab to help spread out the selected candidates in Colour variety mode. It uses simple Euclidean distances in that space, not the more advanced CIEDE2000 formula. [R2]

Gaurav Sharma, Wencheng Wu and Edul N. Dalal published implementation notes and test data for CIEDE2000. Their work is further reading on the care required in measuring colour differences; it is not a method currently implemented here. Neither Lab nor CIEDE2000 predicts the result of mixing two paints. [R3]

3. Why greyscale is useful—and incomplete

The Finder uses the sRGB relative-luminance calculation documented by W3C, including linearisation before applying the channel weights. This supports the numerical calculation, not a claim that the resulting grey exactly matches every viewer’s experience of a coloured surface. [R4]

Mark D. Fairchild, in research hosted by Rochester Institute of Technology, explains factors that must be controlled when testing colour appearance, including illumination, background and surround. For an artist, the practical consequence is to compare your mixtures in their intended lighting and alongside neighbouring colours; a screen swatch alone is incomplete information. This study does not test our greyscale conversion or prescribe our value bands. [R5]

4. Why a HEX code is not a paint recipe

Šárka Sochorová and Ondřej Jamriška developed a pigment-mixing method using a Kubelka–Munk model and a latent representation while retaining an RGB interface. Their paper demonstrates the distinction between ordinary RGB blending and modelling pigment behaviour. The Finder does not implement their method or Mixbox, use measured pigment data, or solve an inverse paint recipe. Its named-paint suggestions are broad starting directions to test physically. [R6]

The Colour Literacy Project explains the different RGB, CMY and traditional RYB frameworks and why three colourants cannot reproduce every colour. It supports the explanation of primary systems, not the accuracy of any particular recipe offered here. [R7]

5. Palette extraction is different from colour harmony

Daniel Cohen-Or, Olga Sorkine, Ran Gal, Tommer Leyvand and Ying-Qing Xu studied modifying image colours to fit harmonic schemes. This is related research, not an algorithm used by the Finder: our extraction does not score beauty, prescribe the best palette or automatically recolour the photograph. A statistically representative palette still needs the artist’s judgement. [R8]

6. The Brueghel worked example

The National Gallery, London lists Landscape with Travellers and Peasants on a Track by Jan Brueghel the Elder, dated 1610. That establishes the work’s identity. Our observations about the dark foreground, lighter distance and clothing are a visual teaching exercise using the supplied reproduction, not a museum-authored tonal analysis. The reproduction is not calibrated. [R9]

What remains a Vault Canvas teaching choice?

Starting with five colours; offering three, five or nine fixed grey bands; numbering display values from 0 = white to 9 = black; the weighting used in Colour variety; and our per-swatch paint prompts are design or teaching choices. No study cited here establishes those particular settings as optimal. A five-band image is a simplification of the photograph, not an automatically improved composition. The display numbers are neither Munsell values nor CIELAB L*.

Linked bibliography

  1. Heckbert, P. (1982). Color Image Quantization for Frame Buffer Display. ACM SIGGRAPH Computer Graphics, 16(3), 297–307. University publication record and abstract. Use here: background on quantisation and colour mapping.
  2. CIE. CIE 1976 L*a*b* colour space (CIELAB), International Lighting Vocabulary. Use here: definition and equations for the approximately uniform space used for candidate diversity.
  3. Sharma, G., Wu, W. & Dalal, E. N. (2005). The CIEDE2000 Color-Difference Formula: Implementation Notes, Supplementary Test Data, and Mathematical Observations. Color Research & Application, 30(1), 21–30. Author’s university page links the paper and test data. Use here: further reading; CIEDE2000 is not implemented.
  4. W3C. Web Content Accessibility Guidelines 2.2: relative luminance. Use here: sRGB linearisation and relative-luminance channel weights.
  5. Fairchild, M. D. (1995). Testing Colour-Appearance Models: Guidelines for Coordinated Research. Color Research & Application, 20, 262–267. DOI: 10.1002/col.5080200410. RIT hosts a pre-peer-reviewed version. Use here: viewing-condition context and limits.
  6. Sochorová, Š. & Jamriška, O. (2021). Practical Pigment Mixing for Digital Painting. ACM Transactions on Graphics, 40(6), article 234, SIGGRAPH Asia 2021. University research page. Use here: pigment-model background; not implemented by the Finder.
  7. Colour Literacy Project. ‘Primary’ colours. Educational resource. Use here: distinctions and limitations of primary frameworks; not a peer-reviewed trial of this tool.
  8. Cohen-Or, D., Sorkine, O., Gal, R., Leyvand, T. & Xu, Y.-Q. (2006). Color Harmonization. ACM SIGGRAPH 2006; ACM Transactions on Graphics, 25(3). ETH Zurich project page links the paper. Use here: related research on harmony, not extraction or proof of artistic quality.
  9. National Gallery, London. Collection search: Jan Brueghel; see also the 2010–2011 Annual Review (PDF), which discusses the painting. Use here: identity and collection context of the worked example.

Links lead to original research, author/university records, standards or museum sources. Some papers may require institutional access; linked records and abstracts still identify the work. Researchers and organisations listed here have not reviewed or endorsed this software.

Citing this version

Suggested citation: Vault Canvas, Palette & Value Finder: Methodology, version 1.5, https://vaultcanvas.ai/resources/palette-value-finder/methodology. Add your access date.

Colour location display

Show where in image assigns each reduced-image pixel to the nearest current palette swatch in encoded RGB. The selected group remains in colour and other pixels are faded towards white. This is approximate group membership, not proof that a mean swatch exists as an exact pixel. Picked swatches also show the original picked pixel with a ring. Edited swatches have no original source; their map shows current nearest-colour membership only. This display does not alter the reference or exported images.

← Return to the Palette & Value Finder