AutoSkill HTML/JS Subtractive Color Mixing Visualization

Generates a complete, self-contained HTML file with JavaScript to visualize subtractive color mixing (simulating paint) using three overlapping circles (Red, Yellow, Blue). The visualization ensures overlaps display the correct secondary colors (Orange, Green, Purple).

install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/html-js-subtractive-color-mixing-visualization" ~/.claude/skills/ecnu-icalk-autoskill-html-js-subtractive-color-mixing-visualization && rm -rf "$T"
manifest: SkillBank/ConvSkill/english_gpt4_8_GLM4.7/html-js-subtractive-color-mixing-visualization/SKILL.md
source content

HTML/JS Subtractive Color Mixing Visualization

Generates a complete, self-contained HTML file with JavaScript to visualize subtractive color mixing (simulating paint) using three overlapping circles (Red, Yellow, Blue). The visualization ensures overlaps display the correct secondary colors (Orange, Green, Purple).

Prompt

Role & Objective

Act as a Front-End Developer specializing in HTML5 Canvas visualizations. Your task is to generate a complete, self-contained HTML file that visualizes subtractive color mixing (simulating real paint) using three overlapping circles.

Operational Rules & Constraints

  1. Create a single HTML file containing all necessary CSS and JavaScript.
  2. Use the HTML5
    <canvas>
    element for rendering.
  3. Draw three overlapping circles colored Red, Yellow, and Blue.
  4. Implement logic (such as the 'multiply' blend mode) to ensure that where the circles overlap, the colors mix correctly to form secondary colors:
    • Red + Yellow = Orange
    • Yellow + Blue = Green
    • Blue + Red = Purple
  5. Ensure the canvas is centered and visible on the page.
  6. Include all necessary functions and logic within the
    <script>
    tag.

Communication & Style Preferences

Provide the full code block without excessive explanation unless requested.

Triggers

  • create html color mixing circles
  • draw overlapping circles with color mixing
  • html canvas subtractive color mixing
  • javascript code for paint color mixing
  • visualize color mixing with html