PINE LIBRARY
تم تحديثه ColourUtilities

Library "ColourUtilities"
Utility functions for colour manipulation
adjust_colour(rgb, desaturation_amount, transparency_amount)
to reduce saturation or increase transparency of an RGB colour
Parameters:
rgb (color)
desaturation_amount (float): 0 means no desaturation (colours remains as-is), and 1 means full desaturation (colour turns grey). Can also be used inversely with negative numbers
transparency_amount (float): How much more transparent the default transparency should become. E.g. with a value of 0.5, a transparency of 0 becomes 50 and 40 becomes 70. A value of 1 makes it fully transparent, en -1 fully opaque.
Returns: color with adjusted saturation and transparency
method apply_default_palette(self, palette_name)
Some nice looking colour palettes, consisting of 6 gradient colours, are already defined here and can be quickly applied to the Palette class
Namespace types: Palette
Parameters:
self (Palette)
palette_name (string): Currently there are 4 6-coloured palettes available: "GYTS flux signal", "GYTS purple", "GYTS flux filter" and "GYTS maroon"
Returns: None, as it populates the Palette class with pre-defined colours
method get_colour(self, colour_no, transparency)
Retrieves colour from the palette and possibly changes transparency if set
Namespace types: Palette
Parameters:
self (Palette)
colour_no (int): from the palette
transparency (int): to possibly change the default transparency of the palette
Returns: colour
method get_dynamic_colour(self, x, mid_point, colour_lb, colour_ub, trend_lookback, use_rate)
Retrieves a colour based on strength and direction of the passed series
Namespace types: Palette
Parameters:
self (Palette)
x (float): the input data series
mid_point (float): value as a cutoff point where the bullish/bearish colour scenario
colour_lb (float): value (lower bound) where to apply the bearish colour at full strength
colour_ub (float): value (upper bound) where to apply the bullish colour at full strength
trend_lookback (int): how much bars back to check if there was a consistent move into a certain direction, otherwise a the neutral colour from the centre of the palette will be used.
use_rate (bool): whether to use the rate (proportional difference with previous `x` value) or the input series `x` directly
Returns: colour
Palette
Fields:
transparency (series__integer)
palette (array__color)
Utility functions for colour manipulation
adjust_colour(rgb, desaturation_amount, transparency_amount)
to reduce saturation or increase transparency of an RGB colour
Parameters:
rgb (color)
desaturation_amount (float): 0 means no desaturation (colours remains as-is), and 1 means full desaturation (colour turns grey). Can also be used inversely with negative numbers
transparency_amount (float): How much more transparent the default transparency should become. E.g. with a value of 0.5, a transparency of 0 becomes 50 and 40 becomes 70. A value of 1 makes it fully transparent, en -1 fully opaque.
Returns: color with adjusted saturation and transparency
method apply_default_palette(self, palette_name)
Some nice looking colour palettes, consisting of 6 gradient colours, are already defined here and can be quickly applied to the Palette class
Namespace types: Palette
Parameters:
self (Palette)
palette_name (string): Currently there are 4 6-coloured palettes available: "GYTS flux signal", "GYTS purple", "GYTS flux filter" and "GYTS maroon"
Returns: None, as it populates the Palette class with pre-defined colours
method get_colour(self, colour_no, transparency)
Retrieves colour from the palette and possibly changes transparency if set
Namespace types: Palette
Parameters:
self (Palette)
colour_no (int): from the palette
transparency (int): to possibly change the default transparency of the palette
Returns: colour
method get_dynamic_colour(self, x, mid_point, colour_lb, colour_ub, trend_lookback, use_rate)
Retrieves a colour based on strength and direction of the passed series
Namespace types: Palette
Parameters:
self (Palette)
x (float): the input data series
mid_point (float): value as a cutoff point where the bullish/bearish colour scenario
colour_lb (float): value (lower bound) where to apply the bearish colour at full strength
colour_ub (float): value (upper bound) where to apply the bullish colour at full strength
trend_lookback (int): how much bars back to check if there was a consistent move into a certain direction, otherwise a the neutral colour from the centre of the palette will be used.
use_rate (bool): whether to use the rate (proportional difference with previous `x` value) or the input series `x` directly
Returns: colour
Palette
Fields:
transparency (series__integer)
palette (array__color)
ملاحظات الأخبار
v2- [Added]: Returns the average of two colours. Weights of each colour and output transparency can be overridden.
Pine Script® get_average_colour()
ملاحظات الأخبار
- `adjust_colour()` now uses DSP method to make very smooth gradients
- Added more colour palettes to `Palette`
- Fixed bug in `get_dynamic_colour()` in which argument `use_rate` didn't behave as expected
ملاحظات الأخبار
v4- Upgrade to Pine Script v6
- New colours according to GYTS brand identity: "GYTS pink-purple" and "GYTS pink-green"
- Implementation of enum for colour palette for easier usage
ملاحظات الأخبار
v5- Fix small error for one of palette names
مكتبة باين
كمثال للقيم التي تتبناها TradingView، نشر المؤلف شيفرة باين كمكتبة مفتوحة المصدر بحيث يمكن لمبرمجي باين الآخرين من مجتمعنا استخدامه بحرية. تحياتنا للمؤلف! يمكنك استخدام هذه المكتبة بشكل خاص أو في منشورات أخرى مفتوحة المصدر، ولكن إعادة استخدام هذا الرمز في المنشورات تخضع لقواعد الموقع.
🌸 ---- GoemonYae Trading System (GYTS) ---- 🌸
🌐 Website: goemonyae.com
📖 Documentation: goemonyae.com/docs
💬 Discord server (including YaeBot): discord.gg/ef6Tu4kha3
👔 personal LinkedIn: linkedin.com/in/arthur-nazarian
🌐 Website: goemonyae.com
📖 Documentation: goemonyae.com/docs
💬 Discord server (including YaeBot): discord.gg/ef6Tu4kha3
👔 personal LinkedIn: linkedin.com/in/arthur-nazarian
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
مكتبة باين
كمثال للقيم التي تتبناها TradingView، نشر المؤلف شيفرة باين كمكتبة مفتوحة المصدر بحيث يمكن لمبرمجي باين الآخرين من مجتمعنا استخدامه بحرية. تحياتنا للمؤلف! يمكنك استخدام هذه المكتبة بشكل خاص أو في منشورات أخرى مفتوحة المصدر، ولكن إعادة استخدام هذا الرمز في المنشورات تخضع لقواعد الموقع.
🌸 ---- GoemonYae Trading System (GYTS) ---- 🌸
🌐 Website: goemonyae.com
📖 Documentation: goemonyae.com/docs
💬 Discord server (including YaeBot): discord.gg/ef6Tu4kha3
👔 personal LinkedIn: linkedin.com/in/arthur-nazarian
🌐 Website: goemonyae.com
📖 Documentation: goemonyae.com/docs
💬 Discord server (including YaeBot): discord.gg/ef6Tu4kha3
👔 personal LinkedIn: linkedin.com/in/arthur-nazarian
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.