Generates the same color for long strings of equal length
See original GitHub issueIt seems like it generates the same color for long strings if they have the same number of characters.
E.g.
long sentence abc
long sentence def
long sentence xyz
all generate the same color.
Any thoughts on this?
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Create a hexadecimal colour based on a string with JavaScript
Here's an adaptation of CD Sanchez' answer that consistently returns a 6-digit colour code: var stringToColour = function(str) { var hash = 0; ......
Read more >NetLogo 6.3.0 User Manual: Programming Guide
The same goes for patches and links. Some variables are built into NetLogo. For example, all turtles and links have a color variable,...
Read more >Surface plot - MATLAB surf - MathWorks
This MATLAB function creates a three-dimensional surface plot, which is a three-dimensional surface that has solid edge colors and solid face colors.
Read more >3.1 Using Data Types - Introduction to Programming in Java
Java's Color data type represents color values using the RGB color model where a color is defined by three integers (each between 0...
Read more >Color | Android Developers
A color long always defines a color using 4 components packed in a single 64 bit long value. ... Indicates whether some other...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Yeah I know that it’s because of the hash function =D What I was implying is “shouldn’t the default hash function be better than this!?”
@shahinism lose lose is what @zenozeng suggested above