This is just a vague question based on curiosity.
Let's say I was storing colours in a database as just the hex value (ignore keys). The application should display the hex value and the RGB value.
I'm wondering if it would be better to store the RGB values in the database as well or use a JavaScript function on the hex value to produce the RGB after the query. The function is only like four lines and naturally the query would be the same but would return more data.
Would there be any discernible difference in performance? Presumably you would only really start to notice any if there were hundreds of thousands of entries.
Which method makes more sense conceptually?