Xah Talk Show 2026-06-26 Ep798. write JavaScript to create CSS OKLCH colors
Video Summary (Generated by AI, Edited by Human.)
In this episode of the Xah Talk Show, host Xah Lee provides a long-form coding session focused on creating a CSS OKLCH color table using pure, raw JavaScript. Throughout the video, he shares his opinions on programming, history, and computing standards.
Key Highlights:
- Color Spaces and CSS: Xah discusses various color models, including RGB, HSL, HWB, and the modern OKLCH (Lightness, Chroma, Hue). He criticizes traditional RGB hex codes and the magic number "256" as legacies of Unix and C design that he considers idiotic (0:00 - 34:00).
- JavaScript Coding Session: The core technical work involves writing a JavaScript script to dynamically generate a table of color squares with increasing parameter values. He walks through:
- Setting up the div root for insertion (46:13).
- Implementing a range function to handle increments (56:14).
- Using template strings to define the color values (1:12:37).
- Troubleshooting DOM insertion issues (1:19:35 - 1:22:45).
Programming and Philosophical Digressions: The video is interspersed with commentary on:
- Lisp dialects (Common Lisp, Scheme, Emacs Lisp, and Clojure), where he shares his critiques on their usability and industry adoption (1:03:00 - 1:10:00).
- His preference for split, tented, and mechanical keyboards for ergonomics (44:00 - 45:15).
- His stance on modern media and influencer culture (36:30 - 43:55).
- Xah concludes the video by successfully generating a basic color sample table and mentioning his plans to refine the script with nested loops offline.
highlights
- what about lisp? common lisp, racket scheme lisp, emacs lisp, clojure.
- https://youtu.be/gYTQFBPTA1Y?t=3782
- RGB hexadecimal color, the brain damage of the c cpp bit diddlers
- https://youtu.be/gYTQFBPTA1Y?t=416
- what are the most important thing about keyboard
- https://youtu.be/gYTQFBPTA1Y?t=2641
- Write Javascript to add a table of colors of increasing parameter value for OK LCH color
- Use the CSS grid layout
- CSS: OKLCH color
Table[ Hue[x, 0.9, 0.5] , {x,0, 1, 0.1}]