Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Algorithms
  4. high-contrast color array generation

high-contrast color array generation

Scheduled Pinned Locked Moved Algorithms
data-structures
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    followait
    wrote on last edited by
    #1

    I want an array of colors which can be distinguished eaily by human. The more colors the better. At least, manually constructed array is also ok. Thanks very much.

    system

    A R 2 Replies Last reply
    0
    • F followait

      I want an array of colors which can be distinguished eaily by human. The more colors the better. At least, manually constructed array is also ok. Thanks very much.

      system

      A Offline
      A Offline
      Alan Balkany
      wrote on last edited by
      #2

      You want to choose red, green, and blue levels as points in a three-dimensional space that are as far apart as possible. This space is a 3D array where each index goes from 0 to 255. There is also a perceptual component to this problem; a person's perception of color levels is not linear with respect to the numeric indexes. For example, changing from red 20 to red 30 may be perceived as a much different increment than changing from red 120 to red 130. So one approach is to use the geometric approach to suggest colors that are different, present them to the user, and allow the user to select the colors that are used. An enhancement would be to allow the user to "edit" the color presented to increase the difference to the colors already selected.

      U 1 Reply Last reply
      0
      • A Alan Balkany

        You want to choose red, green, and blue levels as points in a three-dimensional space that are as far apart as possible. This space is a 3D array where each index goes from 0 to 255. There is also a perceptual component to this problem; a person's perception of color levels is not linear with respect to the numeric indexes. For example, changing from red 20 to red 30 may be perceived as a much different increment than changing from red 120 to red 130. So one approach is to use the geometric approach to suggest colors that are different, present them to the user, and allow the user to select the colors that are used. An enhancement would be to allow the user to "edit" the color presented to increase the difference to the colors already selected.

        U Offline
        U Offline
        uusheikh
        wrote on last edited by
        #3

        In image processing, high contrast colors are often used to display labeled images. That is, image that has gone thru the labeling/connected component process. In that case, to display the resultant image, we use something called "Binary Color Table", which consists of 15 different colors, that are completely different with each other. These are the colors; byte bSize = 15; // Binary palette has 15 colors, cycled 15 times. byte r[] = {255,0,0,255,255,0,255,255,127,127,0,0,255,127,127}; byte g[] = {0,255,0,255,0,255,127,0,255,0,127,255,127,255,127}; byte b[] = {0,0,255,0,255,255,0,127,0,255,255,127,127,127,255};

        1 Reply Last reply
        0
        • F followait

          I want an array of colors which can be distinguished eaily by human. The more colors the better. At least, manually constructed array is also ok. Thanks very much.

          system

          R Offline
          R Offline
          Russell
          wrote on last edited by
          #4

          Take a look also here[^], there are also the text tables for each array.


          Russell

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups