Skip to content

A small proof of concept script to determine the brightness of an image behind a text element, then use classes to set the text colour for appropriate contrast.

Notifications You must be signed in to change notification settings

isAdrisal/contrast-text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

contrast-text

A small proof of concept script to determine the brightness of an image behind a text element, then use classes to set the text colour for appropriate contrast.

Getting started

You'll need to run the index.html using a local server such as http-server to avoid security-related canvas errors.

Works with

  • Chrome
  • Firefox
  • Edge Legacy
  • IE11

About

A small proof of concept script to determine the brightness of an image behind a text element, then use classes to set the text colour for appropriate contrast.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages