Skip to content

Some minor tweaks to the color picker after interest was expressed during a Content Creator User Group#5895

Open
callumlinden wants to merge 1 commit into
developfrom
callum/color-picker-tweaks
Open

Some minor tweaks to the color picker after interest was expressed during a Content Creator User Group#5895
callumlinden wants to merge 1 commit into
developfrom
callum/color-picker-tweaks

Conversation

@callumlinden
Copy link
Copy Markdown
Contributor

Description

A request to tackle this Canny came up in a recent Content Creators User Group and since creating the color picker was the first job I was given at Linden, I offered to help.

The Viewer GitHub issue for this task is here.

Changes

  • Doubled the palette slots from 32 to 64

    • I experimented with adding more but making room by reducing the size of individual UI components makes it difficult to use and adding more slots makes the floater bigger. Moving to 64 vs 128/256 seemed like a good compromise.
  • Added a hex color output / input (e.g. #AF4532)

    • Displays current color in uppercase hex
    • Allows you to paste a hex color from a different tool (strips off leading # and removes any whitespace)
  • Added a "Copy As..." combo box

    • Allows you to copy the current color as:
      • LSL: <0.455, 0.321, 0.054>
      • HEX: #45FC12
      • RGB: (126, 34, 134)
      • HSL: (123°, 34%, 87%)
      • CMYK: (12%, 34%, 12%, 45%)
    • As a combo box, other formats can easily be added in the future - for example:
      • HEX lowercase: #45fc12
      • HSL unadorned: (123, 34, 87)
      • Dozens of other weird and wonderful color formats...

Out of scope

  • Palette generator
    • A great idea but a lot of work - too much for this quick set of tweaks
  • Remove saving of colors.xml - save your colors online
    • Another great idea but we have to easy way to do this currently. Would likely be part of a unified plan to push all settings into the cloud.

Testing

  • First step is to run the current color picker test noting that there are some differences in widgets but that things should work as before (opening the floater, dragging colors, using the pipette in world, etc.)

  • Confirm the existing functionality works as before with 64 slots vs 32

    • Selecting colors updates all the fields
    • Dragging a color from the swatch onto any of the palette slots works as before
    • Deleting colors.xml in the user_settings folder results in a standard set of colors in the palette and 32 grey unused entries afterwards
  • Hex widget

    • Contains the correct hex representation of the current color
    • Updates like the RGB & HSL widgets when new colors are selected
    • Allows paste of a 6 digit valid hex color (no #) from a different tool (AB45CD)
    • Allows paste of a valid hex color with # symbol (#4512CE)
    • Allows paste of a valid hex color with whitespace ( 12CEA5 )
    • Allows paste of a valid hex color with whitespace and # symbol ( #12CEA5 )
      • In all cases, the resulting entry in the hex field should represent the correct color
    • Disallows paste of a 6 digit INVALID hex color from somewhere else (e.g. XYZ123)
    • Allows copy out of widget into a different tool
  • Copy As... combo

    • Try each of the options and paste into a different tool or confirm visually in a text editor
    • See description above for expected formats
    • Confirm values at the limit exactly match the existing values in the input widgets
      • e.g. 255, 0, 0 in the RGB spinners should result in the right values for LSL <1.0, 0.0, 0.0> , RGB (255, 0, 0) etc.
    • Confirm random values exactly match the existing values in the input widgets
      • There is some rounding going on so confirm arbitrary values in the spinners match the copy/paste output.
        • e.g. 123, 81, 45 in the spinners doesn't become RBB(122, 80, 45)
    • If any useful or common formats missing, suggest them - easy to add new ones

… a CCUG and a Canny was generated - details here: #5400
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant