PrismatIQ::AccessibilityCalculator
Inherits Reference < Object
Constructors
new
Instance methods
adjust_for_compliance(foreground : RGB, background : RGB, target_level : WCAGLevel = WCAGLevel::AA, large_text : Bool = false) : RGB | Nil
check_palette_compliance(palette : Array(RGB), background : RGB, large_text : Bool = false, target_level : WCAGLevel = WCAGLevel::AA) : Array(PaletteComplianceEntry)
clear_cache
compliance_report(foreground : RGB, background : RGB) : ComplianceReport
contrast_ratio(foreground : RGB, background : RGB) : Float64
darken(color : RGB, amount : Float64) : RGB
filter_compliant(palette : Array(RGB), background : RGB, level : WCAGLevel = WCAGLevel::AA, large_text : Bool = false) : Array(RGB)
find_nearest_compliant(target : RGB, background : RGB, level : WCAGLevel = WCAGLevel::AA, large_text : Bool = false) : RGB | Nil
lighten(color : RGB, amount : Float64) : RGB
recommend_text_color(background : RGB, level : WCAGLevel = WCAGLevel::AA, large_text : Bool = false) : RGB
relative_luminance(rgb : RGB) : Float64
suggest_accessible_alternatives(color : RGB, background : RGB, large_text : Bool = false) : Array(RGB)
wcag_aa_compliant?(foreground : RGB, background : RGB) : Bool
wcag_aa_large_compliant?(foreground : RGB, background : RGB) : Bool
wcag_aaa_compliant?(foreground : RGB, background : RGB) : Bool
wcag_aaa_large_compliant?(foreground : RGB, background : RGB) : Bool
wcag_level(foreground : RGB, background : RGB, large_text : Bool = false) : WCAGLevel