From 0e496eb113ea8bd6f8ac033ddf3fcaf9e131bd00 Mon Sep 17 00:00:00 2001 From: Rob Tillaart Date: Mon, 6 Nov 2023 14:12:51 +0100 Subject: [PATCH] 0.2.1 map2colour --- libraries/map2colour/CHANGELOG.md | 5 +++++ libraries/map2colour/README.md | 21 +++++++++++++++++++-- libraries/map2colour/library.json | 4 ++-- libraries/map2colour/library.properties | 2 +- libraries/map2colour/m2c_colours.h | 2 +- libraries/map2colour/map2colour.cpp | 3 ++- libraries/map2colour/map2colour.h | 4 ++-- 7 files changed, 32 insertions(+), 9 deletions(-) diff --git a/libraries/map2colour/CHANGELOG.md b/libraries/map2colour/CHANGELOG.md index 2947be65..7ce480dc 100644 --- a/libraries/map2colour/CHANGELOG.md +++ b/libraries/map2colour/CHANGELOG.md @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [0.2.1] - 2023-11-05 +- update readme.md +- minor edits + + ## [0.2.0] - 2023-04-24 - add dynamic size in constructor (minimum 7 for backwards) - add destructor. diff --git a/libraries/map2colour/README.md b/libraries/map2colour/README.md index 4253067e..55ac5700 100644 --- a/libraries/map2colour/README.md +++ b/libraries/map2colour/README.md @@ -2,8 +2,11 @@ [![Arduino CI](https://github.com/RobTillaart/map2colour/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci) [![Arduino-lint](https://github.com/RobTillaart/map2colour/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/map2colour/actions/workflows/arduino-lint.yml) [![JSON check](https://github.com/RobTillaart/map2colour/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/map2colour/actions/workflows/jsoncheck.yml) +[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/map2colour.svg)](https://github.com/RobTillaart/map2colour/issues) + [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/map2colour/blob/master/LICENSE) [![GitHub release](https://img.shields.io/github/release/RobTillaart/map2colour.svg?maxAge=3600)](https://github.com/RobTillaart/map2colour/releases) +[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/map2colour.svg)](https://registry.platformio.org/libraries/robtillaart/map2colour) # map2colour @@ -60,6 +63,12 @@ If returned false the code might behave in unexpected ways. Please note that the colourMap can have duplicate entries even side by side. +#### Related + +- https://github.com/RobTillaart/Kelvin2RGB +- https://github.com/RobTillaart/map2colour + + ## Interface ```cpp @@ -118,7 +127,6 @@ Note that only 3 bytes of 4 of the 32 bit colour patterns are used. The 4th byte might be used in the future. - ## Operation See examples. @@ -245,7 +253,6 @@ Note that the larger the size the more time it takes to find the correct interva - look for optimizations. - cache last value? - #### Could - create a memory efficient version @@ -253,6 +260,8 @@ Note that the larger the size the more time it takes to find the correct interva - split RGB channels for every mapping. - is this useful? only for smallest RAM devices. - remove default array and break backwards compatibility. +- rename **map2_565()** to **map2RGB565()** +- add **map2CMYK()** #### Wont @@ -286,3 +295,11 @@ Note that the larger the size the more time it takes to find the correct interva - divfactors need to be calculated again? - see no real use case. + +## Support + +If you appreciate my libraries, you can support the development and maintenance. +Improve the quality of the libraries by providing issues and Pull Requests, or +donate through PayPal or GitHub sponsors. + +Thank you, diff --git a/libraries/map2colour/library.json b/libraries/map2colour/library.json index d9cbc70e..8a19310e 100644 --- a/libraries/map2colour/library.json +++ b/libraries/map2colour/library.json @@ -15,9 +15,9 @@ "type": "git", "url": "https://github.com/RobTillaart/map2colour.git" }, - "version": "0.2.0", + "version": "0.2.1", "license": "MIT", - "frameworks": "arduino", + "frameworks": "*", "platforms": "*", "headers": "map2colour.h" } diff --git a/libraries/map2colour/library.properties b/libraries/map2colour/library.properties index de784519..0b35d6d7 100644 --- a/libraries/map2colour/library.properties +++ b/libraries/map2colour/library.properties @@ -1,5 +1,5 @@ name=map2colour -version=0.2.0 +version=0.2.1 author=Rob Tillaart maintainer=Rob Tillaart sentence=Arduino library for mapping a float to colour spectrum diff --git a/libraries/map2colour/m2c_colours.h b/libraries/map2colour/m2c_colours.h index 97029380..b57518d2 100644 --- a/libraries/map2colour/m2c_colours.h +++ b/libraries/map2colour/m2c_colours.h @@ -5,8 +5,8 @@ // PURPOSE: Arduino library for mapping a float to colour spectrum // URL: https://github.com/RobTillaart/map2colour - // https://www.w3.org/wiki/CSS/Properties/color/keywords + #define M2C_BLACK 0x00000000 #define M2C_SILVER 0x00C0C0C0 #define M2C_GRAY 0x00808080 diff --git a/libraries/map2colour/map2colour.cpp b/libraries/map2colour/map2colour.cpp index 2a3ac53a..f528adea 100644 --- a/libraries/map2colour/map2colour.cpp +++ b/libraries/map2colour/map2colour.cpp @@ -1,7 +1,7 @@ // // FILE: map2colour.cpp // AUTHOR: Rob Tillaart -// VERSION: 0.2.0 +// VERSION: 0.2.1 // PURPOSE: Arduino library for mapping a float to colour spectrum // URL: https://github.com/RobTillaart/map2colour @@ -10,6 +10,7 @@ #define M2C_MIN_SIZE 7 + map2colour::map2colour(uint8_t size) { _size = size; diff --git a/libraries/map2colour/map2colour.h b/libraries/map2colour/map2colour.h index a98fc283..96de4943 100644 --- a/libraries/map2colour/map2colour.h +++ b/libraries/map2colour/map2colour.h @@ -2,7 +2,7 @@ // // FILE: map2colour.h // AUTHOR: Rob Tillaart -// VERSION: 0.2.0 +// VERSION: 0.2.1 // PURPOSE: Arduino library for mapping a float to colour spectrum // URL: https://github.com/RobTillaart/map2colour @@ -11,7 +11,7 @@ #include "m2c_colours.h" -#define MAP2COLOUR_LIB_VERSION (F("0.2.0")) +#define MAP2COLOUR_LIB_VERSION (F("0.2.1")) class map2colour