Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7498867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:37:23+00:00 2026-05-29T19:37:23+00:00

I need to represent a series of elements through time. For designing purposes each

  • 0

I need to represent a series of elements through time. For designing purposes each of them should have a color to make it simplier to identify each one at a glance. The point is that color each elemnt would make no sense if the difference in color between them is not appreciable by humans.

The only fixed attribute the elements have is their ID. This ID is supossed to differ by one from one element to another, but this is not certain.

What I look for is a hash function that based on a numeric ID returns an HEX color (web format e.g. #f62035) that differs a lot with the previous ID and the next ID. Also, the HEX color must not be too dark since the background where the elements are displayed is black.


Example:

Element ID: 12  
Element ID: 13

hash(12) = #f46600  
hash(13) = #5aa9aa
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T19:37:24+00:00Added an answer on May 29, 2026 at 7:37 pm

    IMHO, and depeding how many different colors you are going to need, I think your best solution would be to build a list of colors to use, with say 100 different variations of color, and sort them in the order you want to use them, then you can use these as your colors by assigningn them from this list in order, when you get to the end of the list, you can start again.

    This solution would not be scalable, but you have to keep in mind that there are only very few colors that humans can tell they are different and suit your design.

    To create this list, maybe you can write a different java application that swhows a color picker, so you can choose colors and the code creates the list for you

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to represent the time in (%m/%d/%Y %H:%M:%S) format from the float value
I have the following Json collection and I need to represent it as a
I have a series of UIImages with which I need to simulate depth. I
I have an application which processes images through a series of image filters in
I need to represent a 40-bit binary number. Which C datatype should be used
I have a page with a series of divs. Each div represents a slide
I need to represent calculator key presses by the text for the keys to
We need to represent huge numbers in our application. We're doing this using integer
I need to represent an IEEE 754-1985 double (64-bit) floating point number in a
I need to represent immutable vectors in Python (vectors as in linear algebra, not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.