annotate graphics/colour/dullify.m @ 61:eff6bddf82e3 tip

Finally implemented perceptual brightness thing.
author samer
date Sun, 11 Oct 2015 10:20:42 +0100
parents 82075c94eed1
children
rev   line source
samer@47 1 function D=contrast(C,s)
samer@47 2 % contrast(C,s)
samer@47 3 % adjust contrast of colourmap - moves all
samer@47 4 % colours towards a medium grey.
samer@47 5 % C - colourmap (N by 3 matrix)
samer@47 6 % s - contrast: 1 no change, 0 completely grey
samer@47 7
samer@47 8 D=s*C + (1-s)*0.5*ones(size(C));
samer@47 9
samer@47 10
samer@47 11
samer@47 12