Skip to content

JarosLucky/contrast-ratio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Contrast Ratio for Garry's mod

This module produces WCAG contrast ratio measurement and scoring.

API

COLOR:GetLuminance()

Get cached calculated the contrast ratio

Returns float contrast ratio

COLOR:CalcLuminance()

Get calculated the contrast ratio

Returns float contrast ratio

util.ContrastRatio

Get a score for the contrast between two colors

Parameters

Returns float contrast ratio

util.ContrastRatioLevel

Get a level of the contrast between two colors

Returns number level contrast ratio

util.ContrastRatioRate

Get a textual score from a numeric contrast value

Parameters

Returns string score

util.ContrastColor

Get a contrast color for first argument

Parameters

Returns color contrast

About

Get the contrast ratio and WCAG score between color in order to ensure accessibility

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages