{
  "id": 22569167,
  "title": "How One RGB Formula Transformed My Entire Portfolio",
  "url": "https://urgent.news/2026/11/29/how-one-rgb-formula-transformed-my-entire-portfolio",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-29T04:00:02.000Z",
  "source": {
    "name": "HackerNoon",
    "slug": "hackernoon",
    "url": "https://hackernoon.com/how-one-rgb-formula-transformed-my-entire-portfolio?source=rss"
  },
  "original_language": null,
  "account": "A few weeks ago, my portfolio consisted of a dark, functional grid. While decent, the projects I was developing—audio-reactive shaders, WebXR installations, and animated canvas experiments—were far more captivating than the site displaying them. Consequently, I decided to reconstruct the visual layer using just one color formula applied to all interactive elements on the page.\n\nAt the core of this alteration lies a simple mapping of cursor position to RGB values. The formula takes the cursor's x and y coordinates, normalizes them to a range between 0 and 100, and then applies the function cv to convert these normalized values into RGB components. For the red and green channels, cv returns a value between 0 and 255, while for blue, it adds 255 to the result, ensuring a visually distinct palette.\n\nThe formula is implemented in four distinct areas: the logo, the ambient background, the card borders, and a cursor follower bloom. These elements share the same color derivation, allowing the entire page to shift in unison as the cursor moves. This shared formula creates a sense of coherence throughout the portfolio, transforming it from a collection of isolated animations into a unified, living document.\n\nThe logo is created using a CSS mask applied to a PNG wordmark, with the gradient behind it dynamically generated based on cursor position. The background features four radial blobs whose colors change along with the cursor, creating a shifting color field that breathes with small time-based oscillations.\n\nEach project card contains a chromatic border that reacts individually to the cursor's position within the card. This creates the illusion of individual life for each card. The formula is applied within a requestAnimationFrame loop, adjusting the border color with subtle sin wave oscillations to keep the cards visually engaging.\n\nTo maintain a pastel aesthetic rather than a neon look, the minimum channel value is set to 140, preventing the colors from becoming too saturated. This gentle color scheme complements the overall pastel feel of the portfolio.\n\nFinally, a cursor follower div tracks the cursor with a lerp factor of 0.06, creating a trailing effect that complements the background's movement. The entire system is driven by a single color formula, resulting in a cohesive and dynamic portfolio experience that feels like a single, unified entity rather than separate, disconnected parts.",
  "summary": "How I built a cursor-reactive colour system that runs through every interactive element on my portfolio: logo, background, card borders, cursor follower…",
  "summary_source": "publisher",
  "key_points": [],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "outlets_capped": false,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}