Colorscales based on quantitative measure?

Hi all,

Is it possile to create colorscales on semi-involved logic?
Example:
I have the groups A, B, C. But each data point can be different degrees of these groups.
So say A = red, B = blue, C = yellow.
Then if I have a point that is 80% A, then it should be dark red. If 40% A, then light red.
Luckily, the data points will never overlap the different groups.

Thanks!

Hmm. I don’t quite understand. How can a point be 80% of A?

Okay so a bit more context. We are doing research on Brain Cancer.
Here, genes do most often mutate in groups rather than alone.

So say that a group is called “A” but that “A” is made up of 5 genes. Genes “a1”, a2", “a3”, a4", and “a5”. If a particular datapoint has any mutation in any of the a_i genes then it is in group A. If it has mutation in 4 out of those 5 genes then it would be - as an example - “80% A”, from (4/5).

Makes sense? :slight_smile:

So I have a binary row vector for each data point where 1 represent a mutated gene and 0 represents no mutation.
So to assign a color, I would have to first check exactly which genes have mutated and then how many inside that group.