I had success with workarounds that involve the use of each record's name length or amount, but it's pretty dirty.
I hope you enjoy our blog so let’s start with a basic HTML structure for the Random Color Generator. We use HTML, Css, and javascript for this Random Color Generator. So I don't really care about contrast against backgrounds or text, I just need a different color. In this blog, we learn how we create the Random Color Generator. So, the maximum value can be FFFFFF - white color, and the minimum value can be 000000 - black color. So, to get a random colour you can use random (0, 255) to get random values for each. Right now, it generates one color for everything, but if I make that query generate one different color for every record, then it'll look better. The value of the Hexadecimal can range from 00 to FF. I was briefly testing it and it's pretty complex for me, but I made it work using my data. This is the big picture there's a charting solution for access on devhunt (can't post links), it's based on a webcontrol and javascript. Still generates only one random color for each record. ORDER BY Sum(tbExpedientes.Monto) DESC The_Doc_Man: I removed the extra randomize and the +1. HAVING (((Sum(tbExpedientes.Monto)) Is Not Null)) GROUP BY tbPersonas.Nombre, rndcolorhex() After that, we simply need to do some basic string concatenation. Firstly, Generate a hex code and Secondly, copy it to the clipboard. These values will represent the red, green, and blue components of our colors. The Random Hex Code Generator has two main functions. Generating an RGB Color Value This requires us to create three random integers between 0 and 255. SELECT TOP 20 tbPersonas.Nombre, Sum(tbExpedientes.Monto) AS SumaDeMonto, rndcolorhex() AS Expr1įROM tbPersonas INNER JOIN (tbExpedientes INNER JOIN tbSolicitantes ON tbExpedientes.ExpedienteID = tbSolicitantes.ExpedienteID) ON tbPersonas.PersonaID = tbSolicitantes.PersonaID Generating Random Colors We will now write the code to create random colors in RGB, hex, and HSL notation.