{"id":15423192,"url":"https://github.com/5t3ph/houdini-cosmic-starfield","last_synced_at":"2026-05-19T14:34:08.762Z","repository":{"id":57266879,"uuid":"410593895","full_name":"5t3ph/houdini-cosmic-starfield","owner":"5t3ph","description":"Generate a dynamic cosmic starfield with optional cosmic clouds and customizable gradient.","archived":false,"fork":false,"pushed_at":"2021-09-26T21:37:24.000Z","size":4822,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-19T06:27:24.989Z","etag":null,"topics":["css","css-houdini","houdini-css-paint"],"latest_commit_sha":null,"homepage":"https://codepen.io/5t3ph/pen/RwgqVZO","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/5t3ph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-26T15:47:51.000Z","updated_at":"2021-09-27T22:04:15.000Z","dependencies_parsed_at":"2022-08-25T03:41:15.900Z","dependency_job_id":null,"html_url":"https://github.com/5t3ph/houdini-cosmic-starfield","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"5t3ph/11ty-css-houdini","purl":"pkg:github/5t3ph/houdini-cosmic-starfield","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5t3ph%2Fhoudini-cosmic-starfield","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5t3ph%2Fhoudini-cosmic-starfield/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5t3ph%2Fhoudini-cosmic-starfield/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5t3ph%2Fhoudini-cosmic-starfield/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/5t3ph","download_url":"https://codeload.github.com/5t3ph/houdini-cosmic-starfield/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/5t3ph%2Fhoudini-cosmic-starfield/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274935947,"owners_count":25376831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","css-houdini","houdini-css-paint"],"created_at":"2024-10-01T17:40:45.755Z","updated_at":"2026-05-19T14:34:08.733Z","avatar_url":"https://github.com/5t3ph.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![preview of the effect showing a linear gradient from top to bottom of nearly black, dark purple, and a purpley navy, over top of which are many small dots in varying sizes and opacity, then a cloud like effect, and final the words Hello World](preview.png)\n\n# CSS Houdini Cosmic Starfield\n\n\u003e From Stephanie Eckles [@5t3ph](https://twitter.com/5t3ph) - author of [ModernCSS.dev](https://moderncss.dev).\n\nGenerate a dynamic cosmic starfield with optional cosmic clouds and customizable gradient.\n\n**[Preview on CodePen](https://codepen.io/5t3ph/pen/RwgqVZO)**\n\n## How to Use\n\nWhile Houdini paint worklets have the best support out of available Houdini features, they still currently require a polyfill to ensure they are applied cross browser.\n\nSo, first include the following once in your project.\n\n```html\n\u003cscript src=\"https://unpkg.com/css-paint-polyfill\"\u003e\u003c/script\u003e\n```\n\n\u003e Note: The polyfill will not work if the worklet is applied to pseudo elements, and _may_ have issues with customization when applied to the `body` element.\n\nThen, include the paint worklet script _after_ the polyfill is loaded:\n\n```html\n\u003cscript\u003e\n  CSS.paintWorklet.addModule(\"https://unpkg.com/houdini-cosmic-starfield\");\n\n  // Trickery to get the polyfill to draw the worklet in Firefox and Safari\n  setTimeout(() =\u003e {\n    document.querySelector(\"ANCESTOR_ELEMENT\").style.width = \"100.01%\";\n    document.querySelector(\"ANCESTOR_ELEMENT\").style.width = \"100%\";\n  }, 500);\n\u003c/script\u003e\n```\n\nFinally, use it in your styles! For best results, assign as the `background-image` to a dedicated element.\n\n```css\n.cosmic-starfield-element {\n  /* Number of stars */\n  --cosmic-starfield-stars: 4280;\n  /* 'true' or do not include to hide the clouds */\n  --cosmic-starfield-clouds: true;\n  /* String array of at least two hex codes */\n  --cosmic-starfield-gradient-colors: #471f60, #231b6e;\n\n  /* Use the worklet! */\n  background-image: paint(cosmic-starfield);\n}\n```\n\n\u003e `!important` - provided gradient colors must be in hex format.\n\n## What is CSS Houdini?\n\nCheck out other Houdini paint worklets and more info at [Houdini.How](https://houdini.how).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5t3ph%2Fhoudini-cosmic-starfield","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F5t3ph%2Fhoudini-cosmic-starfield","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F5t3ph%2Fhoudini-cosmic-starfield/lists"}