{"id":17939776,"url":"https://github.com/shanecelis/bevy_hsl_multiplier","last_synced_at":"2026-01-15T22:10:53.109Z","repository":{"id":219070919,"uuid":"748101202","full_name":"shanecelis/bevy_hsl_multiplier","owner":"shanecelis","description":"Multiplies texture values in HSL color space","archived":false,"fork":false,"pushed_at":"2024-01-25T09:36:29.000Z","size":1230,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T11:04:22.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"WGSL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shanecelis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"shanecelis"}},"created_at":"2024-01-25T09:24:58.000Z","updated_at":"2024-01-25T09:26:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec460f11-7eec-49ae-b269-e9253941e920","html_url":"https://github.com/shanecelis/bevy_hsl_multiplier","commit_stats":null,"previous_names":["shanecelis/bevy_hsl_multiplier"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanecelis%2Fbevy_hsl_multiplier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanecelis%2Fbevy_hsl_multiplier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanecelis%2Fbevy_hsl_multiplier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shanecelis%2Fbevy_hsl_multiplier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shanecelis","download_url":"https://codeload.github.com/shanecelis/bevy_hsl_multiplier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246999360,"owners_count":20866893,"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","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":[],"created_at":"2024-10-29T00:44:11.861Z","updated_at":"2026-01-15T22:10:53.069Z","avatar_url":"https://github.com/shanecelis.png","language":"WGSL","funding_links":["https://github.com/sponsors/shanecelis"],"categories":[],"sub_categories":[],"readme":"# bevy_hsl_multiplier\n![Maintenance](https://img.shields.io/badge/maintenance-actively--developed-brightgreen.svg)\n[![CI](https://github.com/shanecelis/bevy_hsl_multiplier/actions/workflows/rust.yml/badge.svg)](https://github.com/shanecelis/bevy_hsl_multiplier/actions)\n  [![crates-io](https://img.shields.io/crates/v/bevy_hsl_multiplier.svg)](https://crates.io/crates/bevy_hsl_multiplier)\n  [![api-docs](https://docs.rs/bevy_hsl_multiplier/badge.svg)](https://docs.rs/bevy_hsl_multiplier)\n\nThis crate provides a shader that multiplies a texture's color in HSL color space; it can be applied to 2D\nand 3D objects on the [bevy game engine](https://bevyengine.org).\n\n![hsl multiplier example](https://github.com/shanecelis/bevy_hsl_multiplier/assets/54390/44ff4e83-0b3c-46aa-bc80-ddc51bf337f3)\n\n# Install\n\nNot actually available on crates.io yet.\n\n``` sh\n# cargo add bevy_hsl_multiplier\n```\n\nBut you can get it from the repo directly.\n\n``` sh\ncargo add --git https://github.com/shanecelis/bevy_hsl_multiplier.git\n```\n\n# Usage\n\n## Add plugin to app\n```compile\nuse bevy::prelude::*;\nfn main() {\n    App::new()\n        .add_plugins(bevy_hsl_multiplier::HslMultiplierPlugin)\n        .run()\n}\n```\n\n## Add settings to camera\n\n```compile\nuse bevy::prelude::*;\n\n/// Setup a quad and camera.\nfn setup(\n    mut commands: Commands,\n    mut meshes: ResMut\u003cAssets\u003cMesh\u003e\u003e,\n    mut materials: ResMut\u003cAssets\u003cHslMultiplierMaterial\u003e\u003e,\n    asset_server: Res\u003cAssetServer\u003e,\n) {\n    commands.spawn(Camera2dBundle::default());\n\n    commands.spawn(MaterialMesh2dBundle {\n        mesh: meshes\n            .add(shape::Quad::new(Vec2::new(1024., 1024.)).into())\n            .into(),\n        material: materials.add(HslMultiplierMaterial {\n            hsla_multiplier: Vec4::new(1.0, 1.0, 1.0, 1.0),\n            color_texture: Some(asset_server.load(\"rust_crab.png\")),\n            alpha_mode: AlphaMode::Opaque,\n        }),\n        ..default()\n    });\n}\n```\n\n# Example\n\nRun the \"quad\" example like so:\n\n``` sh\ncargo run --example quad\n```\n\nThis will show a large quad like the one shown at the beginning of this README.\n\n``` sh\ncargo run --example cube\n```\n\nThis will show a rotating cube with the shader as its surfaces.\n\n# License\n\nThis crate is licensed under the MIT License or the Apache License 2.0 or CC0 License.\n\n# Acknowlegments\n\n* [Example rust crab image](https://blog.devgenius.io/creating-an-api-with-rust-clean-architecture-axum-and-surrealdb-2a95b1b72e0f) from [Vitor Lacerda](https://medium.com/@vitorlacerdafaria7).\n\n* Prompted by [PrinceOfBorgo](https://www.reddit.com/user/PrinceOfBorgo/)'s [question](https://www.reddit.com/r/bevy/comments/19dn10x/how_to_edit_colors_of_a_texture_in_a_spritebundle/) on reddit.\n\n* Most code copied wholesale from my other crate the [bevy_terminal_shader](https://github.com/shanecelis/bevy_terminal_shader).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshanecelis%2Fbevy_hsl_multiplier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshanecelis%2Fbevy_hsl_multiplier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshanecelis%2Fbevy_hsl_multiplier/lists"}