Feature: colour palette generator (colour-theory sets) with a world pick that samples the material colour, not the post-processed pixel #431

Open
opened 2026-10-05 11:45:07 +00:00 by sky_line · 0 comments
Owner

Feature request: a colour set (palette) generator for builders and creators. Give it a base colour, pick a colour-theory scheme, and get a set of matching colours to use on objects. You can also pick the base colour from something in the world, sampled from the object's actual surface colour (texture × tint), not the final post-processed screen pixel.

Base colour input

  • A hex / RGB / HSV field, the standard colour picker, or a swatch from a saved palette.
  • World pick: an eyedropper that you click on an object face. It should return the material colour at that point:
    • What to sample: the face's base colour texture at the hit UV × the face's tint / colour (Blinn-Phong diffuse colour, or PBR base colour factor) × vertex colour if any, with alpha reported separately.

    • No lighting or post-processing: no shading, shadows, fog, bloom, tonemapping, exposure, AA or upscaling.

    • The existing picker copies only the face's tint. The current colour picker eyedropper (LLFloaterColorPicker "color_pipette" → LLToolPipette → onColorSelect) copies the clicked face's tint colour (te.getColor()), not the screen pixel and not the texture colour (see the colour-picker validation ticket). This new pick samples the actual surface colour (texture × tint at the hit point) as a separate "sample material" mode, which could also become an option in the regular picker.

    • The hit point: the pick already has the hit face and UV (LLPickInfo mUVCoords / mSTCoords, used by media-on-a-prim). Account for the face's texture transform (repeats, offset, rotation) and for PBR texture transforms (KHR_texture_transform).

    • How to read the texel: the CPU copy may be trimmed or a thumbnail (#159 / #405 RAM tiers), and the GPU copy is block-compressed in a bindless slot. Options:

      • a tiny GPU compute readback: sample the bindless base colour texture at the UV at the highest resident mip, plus the factor, returning RGBA to the CPU;
      • or a CPU decode of the cached J2C at that UV.

      Prefer the GPU path (exact, cheap, no extra RAM), and note the mip that was used.

    • Colour space: report the colour in sRGB (what creators type into SL), and do the maths internally in linear / a perceptual space.

    • Optionally average a small area (3×3 / 5×5 texels) to avoid picking a single noisy texel, and/or show a small magnified preview while hovering.

    • Media faces / animated textures: sample the current frame or skip; say which.

Colour-theory schemes

Compute harmonies in a perceptual colour space (OKLCH / OKLab) rather than plain HSV, so the results look balanced:

  • complementary;
  • split-complementary;
  • analogous (adjustable spread);
  • triadic;
  • tetradic / square / rectangle;
  • monochromatic (tints / shades / tones of the base);
  • possibly "material-friendly" sets: muted, pastel, high-contrast accent.

Options:

  • number of colours;
  • lightness / saturation tweaks;
  • lock individual swatches and regenerate the rest;
  • a randomise-within-scheme button.

Using the result

  • Click a swatch to copy it (hex, <r, g, b> LSL vector 0-1, 0-255 RGB), or send it to the active colour picker.
  • Apply to selected faces (tint) from the Build window.
  • Save and load palettes (per account or global); export / import as a simple file.

Where it lives

  • A small Colour Palette floater (World or Build menu, plus a button in the Build window's Texture tab next to the colour swatch).
  • An optional toolbar button.

Done when

  • The world pick returns the material colour (texture × tint at the hit UV), independent of lighting / post-processing, for Blinn-Phong and PBR faces.
  • Schemes generate sensible palettes (perceptual space), and the user can copy / apply / save them.
  • A wiki page (#415).
**Feature request:** a **colour set (palette) generator** for builders and creators. Give it a base colour, pick a colour-theory scheme, and get a set of matching colours to use on objects. You can also **pick the base colour from something in the world**, sampled from the object's actual surface colour (texture × tint), **not** the final post-processed screen pixel. ## Base colour input - A hex / RGB / HSV field, the standard colour picker, or a swatch from a saved palette. - **World pick:** an eyedropper that you click on an object face. It should return the **material colour at that point**: - **What to sample:** the face's **base colour texture at the hit UV** × the face's **tint / colour** (Blinn-Phong diffuse colour, or PBR base colour factor) × vertex colour if any, with alpha reported separately. - **No lighting or post-processing:** no shading, shadows, fog, bloom, tonemapping, exposure, AA or upscaling. - **The existing picker copies only the face's tint.** The current colour picker eyedropper (`LLFloaterColorPicker` "color_pipette" → `LLToolPipette` → `onColorSelect`) copies the clicked face's **tint colour** (`te.getColor()`), not the screen pixel and not the texture colour (see the colour-picker validation ticket). This new pick samples the actual surface colour (texture × tint at the hit point) as a separate "sample material" mode, which could also become an option in the regular picker. - **The hit point:** the pick already has the hit face and UV (`LLPickInfo` `mUVCoords` / `mSTCoords`, used by media-on-a-prim). Account for the face's texture transform (repeats, offset, rotation) and for PBR texture transforms (KHR_texture_transform). - **How to read the texel:** the CPU copy may be trimmed or a thumbnail (#159 / #405 RAM tiers), and the GPU copy is block-compressed in a bindless slot. Options: - a **tiny GPU compute readback**: sample the bindless base colour texture at the UV at the highest *resident* mip, plus the factor, returning RGBA to the CPU; - or a CPU decode of the cached J2C at that UV. Prefer the GPU path (exact, cheap, no extra RAM), and note the mip that was used. - **Colour space:** report the colour in sRGB (what creators type into SL), and do the maths internally in linear / a perceptual space. - Optionally **average a small area** (3×3 / 5×5 texels) to avoid picking a single noisy texel, and/or show a small magnified preview while hovering. - Media faces / animated textures: sample the current frame or skip; say which. ## Colour-theory schemes Compute harmonies in a **perceptual colour space** (OKLCH / OKLab) rather than plain HSV, so the results look balanced: - complementary; - split-complementary; - analogous (adjustable spread); - triadic; - tetradic / square / rectangle; - monochromatic (tints / shades / tones of the base); - possibly "material-friendly" sets: muted, pastel, high-contrast accent. Options: - number of colours; - lightness / saturation tweaks; - lock individual swatches and regenerate the rest; - a randomise-within-scheme button. ## Using the result - Click a swatch to copy it (hex, `<r, g, b>` LSL vector 0-1, 0-255 RGB), or send it to the active colour picker. - **Apply to selected faces** (tint) from the Build window. - Save and load palettes (per account or global); export / import as a simple file. ## Where it lives - A small **Colour Palette** floater (World or Build menu, plus a button in the Build window's Texture tab next to the colour swatch). - An optional toolbar button. ## Done when - [ ] The world pick returns the material colour (texture × tint at the hit UV), independent of lighting / post-processing, for Blinn-Phong and PBR faces. - [ ] Schemes generate sensible palettes (perceptual space), and the user can copy / apply / save them. - [ ] A wiki page (#415).
sky_line added this to the Slipstream project 2026-10-06 15:04:14 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#431
No description provided.