Lua implementation of HSLuv (revision 4)

Overview

Build Status Package Version

Lua implementation of HSLuv (revision 4), courtesy of Mark Wonnacott.

Installation

Copy the hsluv.lua file directly into your project or install from luarocks:

luarocks install hsluv

Usage

> hsluv = require 'hsluv'
> = hsluv.hex_to_hsluv('#123456')
248.60320341681 85.43201417605  21.04172364179
> = hsluv.husl_to_hex({248.60, 85.43, 21.04})
#123456
> = hsluv.rgb_to_hsluv({0.07, 0.20, 0.33})
248.49244211716 85.009956491035 20.58410610897
> = hsluv.hsluv_to_rgb({248.49, 85.00, 20.58})
0.070014042122372   0.19996570399156   0.32991848455264

For HPLuv, use hex_to_hpluv, hpluv_to_hex, rgb_to_hpluv and hpluv_to_rgb.

License

Copyright (C) 2019 Alexei Boronine

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Issues
  • Add to LuaRocks.org

    Add to LuaRocks.org

    LuaRocks is the primary package manage for Lua: https://luarocks.org/

    In order to add to the site you'll need to create a rockspec, then upload it.

    https://github.com/keplerproject/luarocks/wiki/Creating-a-rock

    Once added anyone can install this library by running luarocks install husl

    opened by leafo 2
The Lua development repository, as seen by the Lua team. Mirrored irregularly

The Lua development repository, as seen by the Lua team. Mirrored irregularly

Lua 5.7k Jun 23, 2022
Implementation of Lua 5.1, originally a fork of LuaJIT 2.0

README for LuaVela (codename uJIT) LuaVela is an interpreter and a Just-In-Time (JIT) compiler for the Lua programming language. Project Homepage: htt

Elias Daler 0 Aug 7, 2020
lua binding for Software implementation in C of the FIPS 198 Keyed-Hash Message Authentication Code HMAC

lua-hmac Compute the SHA-224, SHA-256, SHA-384, and SHA-512 message digests and the Hash-based Message Authentication Code (HMAC). this module is Lua

Masatoshi Fukunaga 3 Mar 22, 2022
Dynamic 3D cellular automata engine with lua scripting support

Cell3D Cell3D is a dynamic 3D cellular automata engine with lua scripting support Installation Dependencies: Lua 5.3 Raylib Simplest possible build co

null 1 May 25, 2021
A programming environment for Lua for the Raspberry Pi Pico microcontroller

picolua A programming environment for Lua for the Raspberry Pi Pico microcontroller. Version 0.3, April 2021 What is this? picolua is a proof-of-conce

Kevin Boone 47 May 23, 2022
Hobbyist Operating System targeting x86_64 systems. Includes userspace, Virtual File System, An InitFS (tarfs), Lua port, easy porting, a decent LibC and LibM, and a shell that supports: piping, file redirection, and more.

SynnixOS Epic Hobby OS targeting x86_64 CPUs, it includes some hacked together functionality for most essential OSs although, with interactivity via Q

RaidTheWeb 40 May 27, 2022
Plua is a superset of Lua for classic PalmOS devices with added support for graphics, UI, networking, events and sound.

Plua2c Plua is a superset of Lua for classic PalmOS devices with added support for graphics, UI, networking, events and sound. This is the source code

Cameron Kaiser 8 May 16, 2022
rlua -- High level bindings between Rust and Lua

rlua -- High level bindings between Rust and Lua

Amethyst Foundation 1.2k Jun 22, 2022
Modified version of srlua for MSVC using version 5.4 of Lua

Modified version of srlua for MSVC using version 5.4 of Lua. Quote from the original README: This is a self-running Lua interpreter. It is meant to be

Augusto Goulart 2 Feb 24, 2022
format lua code

EmmyLuaCodeStyle 项目介绍 该项目是基于C++的lua代码格式化算法库 经过长期实践,发现人们对格式化算法的预期是尽可能少的改动代码的行布局,而列布局符合基本审美就可以了。 基于这样的想法我设计并实现了lua格式化算法 格式化行为介绍 基本语句 该算法的主要特点是分析并对当前代码做出

null 35 Jun 23, 2022
Poly2tri lua wrapper

Poly2tri lua wrapper This is a Lua wrapper around poly2tri. It provides fast, stable Constrained Delauney Triangulation of convex or concave polygons

Dima 9 Nov 25, 2021
FFF is a decentralized blockchain based on IPFS/RIPPLE, which integrates lua virtual machine-based smart contracts.

FFF is a decentralized blockchain based on IPFS/RIPPLE, which integrates lua virtual machine-based smart contracts. It is also a software platform designed to help coordinate voluntary free market operations amongst a set of social actors.

gen2600 5 May 31, 2022
Just a basic mini library for parsing simple files that only have variables written and with Lua extension.

C++ Parser Lua file config Just a basic mini library for parsing simple files that only have variables written and with Lua extension. Note: At the mo

Marcos Oliveira 3 Dec 26, 2021
Lua HTTP async client using libcurl (supports multi requests in parallel)

lua-async-http lua-async-http rock, is a new lua rock written in C and based on libcurl. It allow us to make multiple http/https (with client certific

International Business Machines 4 Jun 11, 2022
Lua Client based on C++ for Polaris

Polaris Lua 中文文档 1. Project Introduction Based on the existing C++ sdk polaris-cpp project of Polaris, this project implements the Lua layer encapsula

Polarismesh 2 Apr 2, 2022
Lua functions, recreated

Remade-Lua during 4th August 2021, Roblox decided to use __inline on their lua functions which has destroyed the usage of the addresses, this repo is

Rexi 25 Jun 23, 2022
C++ binding to Lua

bLua C++与Lua的胶水层,b代表着bridge 特性 依赖C++17 只有一个头文件 接口简单轻量 userdata的方式管理c++指针生命周期 用法 lua调用c++ 首先注册类及需要的成员函数 // 注册全局函数 bLua::reg_global_func(L, "newA", newA

null 1 Dec 28, 2021
Signed - a 3D modeling and construction language based on Lua and SDFs. Signed will be available for macOS and iOS and is heavily optimized for Metal.

Signed - A 3D modeling language Abstract Signed is a Lua based 3D modeling language, it provides a unique way to create high quality 3D content for yo

Markus Moenig 88 May 26, 2022
The Lua programming language with CMake based build

README for Lua 5.1 See INSTALL for installation instructions. See HISTORY for a summary of changes since the last released version. What is Lua? Lua i

The Lua Language distribution [Archived] 1.4k Jun 24, 2022