FastLED 3.9.15
Loading...
Searching...
No Matches
json_helpers.h
Go to the documentation of this file.
1#pragma once
2
4#include "fl/stl/json.h"
5#include "fl/stl/string.h"
6
7namespace fl {
8namespace wled {
9
22bool parseHexColor(const fl::string& hexStr, u8& r, u8& g, u8& b);
23
31fl::string rgbToHex(u8 r, u8 g, u8 b);
32
47void parseSegmentFields(const fl::json& segJson, WLEDSegment& seg);
48
49} // namespace wled
50} // namespace fl
FastLED's Elegant JSON Library: fl::json
void parseSegmentFields(const fl::json &segJson, WLEDSegment &seg)
Parse all fields from a segment JSON object into a WLEDSegment.
bool parseHexColor(const fl::string &hexStr, u8 &r, u8 &g, u8 &b)
Parse hex color string to RGB components.
fl::string rgbToHex(u8 r, u8 g, u8 b)
Convert RGB components to hex string.
unsigned char u8
Definition stdint.h:131
Base definition for an LED controller.
Definition crgb.hpp:179