What is the best way to create a relative color algorithm for data in an HTML table?

I have an HTML data table and I want to emulate the Excel Color scale for conditional formatting , so it highlights the relative value in this data set.

The HTML table simply crosses out the list of rows, and for each row I have a value (0 - 300), and I want it to color the background of the row of the table based on this algorithm, so I assume that it will need to generate a name or HTML color value for each input number

Any help where to start here?

+3
source share
1 answer

, /300 .

( )

html rgb(Rvalue, Gvalue, Bvalue). #RRGGBB.

javascript hex

+1

Source: https://habr.com/ru/post/1779387/


All Articles