Skip to content

Mixin which determines to which dark or light theme an element belongs based on its background color

License

Notifications You must be signed in to change notification settings

SpineElements/spine-contraster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpineContraster

SpineContraster determines the theme (dark or light) an element belongs to based on its background color. Sets darkTheme and lightTheme boolean properties to the element.

Theme detection is based on a background color contrast to black and white colors respectively. If the contrast to black is higher than the contrast to white - light theme is used, otherwise - dark theme. For the algorithm details see:

About

Mixin which determines to which dark or light theme an element belongs based on its background color

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages