colors - Calculting colours based on contrast -


i hi have website runs several colour themes. want change text select colour based on colour theme.

p::selection,   li::selection,   div::selection{     background-color: #hex;     color: #ffffff;   }   

i'm using -moz , -o prefixes.

for colour theme i'm using #274569 default colour of #339aff acceptable , i've calculated contrast. want work out how calculate colour (#148545 example) if have contrast.
there no shortage of resources web calculate contrast of 2 colours i'm after doing other way round, unless there better way of choosing colour. there way this?


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -