{"id":21135612,"url":"https://github.com/ray-cast/lut","last_synced_at":"2025-08-16T11:09:27.742Z","repository":{"id":38434609,"uuid":"136599325","full_name":"ray-cast/lut","owner":"ray-cast","description":"color lookup tables (LUTs) for color grading","archived":false,"fork":false,"pushed_at":"2018-06-19T11:38:04.000Z","size":452,"stargazers_count":104,"open_issues_count":3,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-04T16:53:35.206Z","etag":null,"topics":["color-grading","cube","effect","filter","image-processing","images","lookup-table","lut","photoshop","postprocessing"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ray-cast.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-08T09:40:19.000Z","updated_at":"2024-10-30T05:18:59.000Z","dependencies_parsed_at":"2022-09-01T13:51:24.988Z","dependency_job_id":null,"html_url":"https://github.com/ray-cast/lut","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ray-cast/lut","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-cast%2Flut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-cast%2Flut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-cast%2Flut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-cast%2Flut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ray-cast","download_url":"https://codeload.github.com/ray-cast/lut/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ray-cast%2Flut/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270702562,"owners_count":24630877,"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-08-16T02:00:11.002Z","response_time":91,"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":["color-grading","cube","effect","filter","image-processing","images","lookup-table","lut","photoshop","postprocessing"],"created_at":"2024-11-20T06:56:46.881Z","updated_at":"2025-08-16T11:09:27.717Z","avatar_url":"https://github.com/ray-cast.png","language":"C++","readme":"# Color Lookup Table\nlut.hpp is a C++ 11 single required source file, that can be used to achieve color correction and color grading, you can see ue4 [docs](https://docs.unrealengine.com/en-us/Engine/Rendering/PostProcessEffects/UsingLUTs) for more information\n\n# Color Neutral LUT\n[![link text](ColorNeutralLUT.png)]()\n[![link text](1.jpg)]()\n\n# Candle Light LUT\n[![link text](CandlelightLUT.png)]()\n[![link text](2.jpg)]()\n\n# Usage\n```c++\n#include \"lut.hpp\"\n\n// Usage 1\nauto lut = octoon::image::lut::parse(\"xxx.cube\"); // load the lut from .cube file\nfor (std::size_t i = 0; i \u003c image.size(); i++)\n{\n\tauto data = lut.lookup(rgb.r, rgb.g, rgb.b); // The (r,g,b) can be extended to support these types of std::uint8_t, std::uint16_t, std::uint32_t, float, double\n\trgb.r = data[0];\n\trgb.g = data[1];\n\trgb.b = data[2];\n}\n\n// Usage 2\nauto lut = octoon::image::lut::parse(\"xxx.cube\"); // load the lut from .cube file\nlut.lookup(image.data(), image.data(), image.size(), 3); // The (r,g,b) can be extended to support these types of std::uint8_t, std::uint16_t, std::uint32_t, float, double\n\n// Serializable to .cube stream\nmethod 1 : std::cout \u003c\u003c lut.dump();\nmethod 2 : std::cout \u003c\u003c lut;\n\n// Serializable to image\nauto image = octoon::image::Image(octoon::image::Format::R8G8B8UNorm, lut.width, lut.height);\nstd::memcpy((std::uint8_t*)image.data(), lut.data.get(), lut.width * lut.height * lut.channel);\nimage.save(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\1.png\", \"png\");\n```\n\n[License (MIT)](https://raw.githubusercontent.com/ray-cast/lut/master/LICENSE.txt)\n-------------------------------------------------------------------------------\n    MIT License\n\n    Copyright (c) 2018 Rui\n\n\tPermission is hereby granted, free of charge, to any person obtaining a\n\tcopy of this software and associated documentation files (the \"Software\"),\n\tto deal in the Software without restriction, including without limitation\n\tthe rights to use, copy, modify, merge, publish, distribute, sublicense,\n\tand/or sell copies of the Software, and to permit persons to whom the\n\tSoftware is furnished to do so, subject to the following conditions:\n\n\tThe above copyright notice and this permission notice shall be included\n\tin all copies or substantial portions of the Software.\n\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n\tOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL\n\tBRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN\n\tAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n\tCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fray-cast%2Flut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fray-cast%2Flut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fray-cast%2Flut/lists"}