I knew rgba() obviously but fumbled a bit explaining the ranges out loud.
Identify the CSS color function that takes three channel values and an optional alpha, then explain each argument's interpretation and valid ranges. Emphasize the difference between legacy comma-separated syntax and modern space-separated syntax with slash for alpha. Mention that the function is rgb() (and its alias rgba()).
Pro tip: Show awareness of the evolving CSS Color Module by noting that rgba() is now an alias for rgb(), and that modern syntax uses a slash before alpha. This demonstrates up-to-date knowledge and attention to browser support.
State that the function is rgb() (or rgba() as an alias). Clarify that both accept three color channels and an optional alpha.
Describe that the first three arguments represent red, green, and blue intensities. In legacy syntax, they are integers from 0 to 255; in modern syntax, they can be percentages from 0% to 100% or numbers from 0 to 255.
Explain that the optional fourth argument (or the value after a slash in modern syntax) is alpha, representing opacity. It can be a number from 0 to 1, or a percentage from 0% to 100%.
Mention that legacy syntax uses commas: rgb(255, 0, 0) or rgba(255, 0, 0, 0.5). Modern syntax uses spaces and a slash for alpha: rgb(255 0 0 / 0.5).
Highlight that rgba() is now an alias for rgb(), and that modern syntax is widely supported in evergreen browsers. Mention fallbacks for older browsers if needed.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.