Fix contrast

Find the closest color that reaches a contrast target by changing only OKLCH lightness, so the hue and character stay. Targets: aa (4.5:1), aa-large (3:1), aaa (7:1), apca-body (Lc 75), apca-content (Lc 60), apca-large (Lc 45). Adjust the text color or the background.

get/api/v1/fix-contrast

Request

  • Base URL: https://pickshade.com
  • URL: https://pickshade.com/api/v1/fix-contrast
  • Auth: none declared

Query parameters

textstring required

Text or foreground color

backgroundstring required

Background color

target'aa' | 'aa-large' | 'aaa' | 'apca-body' | 'apca-content' | 'apca-large'
adjust'text' | 'background'

Response

Result

Changes

No recorded changes to this operation across all 1 revision of this API.