Color
Created at 2017-06-28T08:23:41+09:00

TODO

  • physically
    • electromagnetic wave (wavelength 380nm - 780nm)
    • three types of cone cells (S, M, L)
    • spectral radience $L_{e,\omega,\lambda}$
  • theoretically
    • CIE 1931 XYZ color space
      • spectral radience => X, Y, Z (via integral of color matching function)
      • Y represents luminacity (aka brightness)
      • X, Y, Z <=> x, y, Y
      • xy chromaticity diagram (spectral locus, line of purples)
    • color is chromaticity (distribution of wavelength) + brightness (aka lumunance)
    • common color space
      • RGB: r, g, b, white point, (+ gamma correction) => x, y, Y ?
      • CMYK
      • HSL, HSV: h, s, v <=> r, g, b ?

  • display specification

    • X, Y, Z (or equivalently x, y, Y) => (dot color on display)
    • lcd

  • digitally

    • RGB spec (e.g. sRGB) defines the coordinates of 3 primary colors in xy chromaticity diagram and white point (aka gamut)
    • bit depths (e.g. 8bits per primary color R,G,B) only affects resolution of color (not the area of gamut)

  • kms display type

    • framebuffer, encoder, and connector
    • edid

  • my pc

Display
  Some: 13.3" (338mm) HD (1366x768), anti-glare, LED backlight,
     200 nits, 16:9 aspect ratio, 500:1 contrast ratio
  • color temperture

    • gnome wayland implementation
    • redshift
  • gamma correction

    • for perceputual linearity
  • linearity
    • linear in terms of 24bit RGB value
    • linear in terms of light intensity (unit is radiance (W·sr^{-1}·m^{−2}))
    • smoothness for human eye (neuron is more sensitive for changes in lower state ?)

Color temperature

- (mesa) drmModeCrtcSetGamma => DRM_IOCTL(fd, DRM_IOCTL_MODE_SETGAMMA ..) =>
  - (kernel) drm_mode_gamma_set_ioctl => crtc->funcs->gamma_set => .. (driver impl ??)

KMS

[ Data structure ]
edid
drm_connector
drm_encoder
drm_crtc
drm_framebuffer
'-' drm_format_info

drm_display_mode
  • Connector, Encoder, EDID
  • is drmfb easier example ?

Reference