Class RgbColor
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Rgbरंग
लाल, हरे, और नीले रंग के चैनलों से तय किया गया रंग.
तरीके
तरीका | रिटर्न टाइप | संक्षिप्त विवरण |
asHexString() | String | रंग को सीएसएस स्टाइल में, सात वर्णों वाली हेक्साडेसिमल स्ट्रिंग (#rrggbb) या नौ वर्णों वाली हेक्साडेसिमल स्ट्रिंग (#aarrggbb) के तौर पर दिखाता है. |
getBlue() | Integer | इस रंग का नीला चैनल, 0 से 255 के बीच की संख्या के तौर पर. |
getColorType() | ColorType | इस रंग का टाइप पाएं. |
getGreen() | Integer | इस रंग का ग्रीन चैनल, 0 से 255 के बीच की संख्या के तौर पर. |
getRed() | Integer | इस रंग का लाल चैनल, 0 से 255 के बीच की संख्या के तौर पर. |
ज़्यादा जानकारी वाला दस्तावेज़
asHexString()
रंग को सीएसएस स्टाइल में, सात वर्णों वाली हेक्साडेसिमल स्ट्रिंग (#rrggbb) या नौ वर्णों वाली हेक्साडेसिमल स्ट्रिंग (#aarrggbb) के तौर पर दिखाता है.
वापसी का टिकट
String
— रंग का हेक्स वर्शन.
getBlue()
इस रंग का नीला चैनल, 0 से 255 के बीच की संख्या के तौर पर.
वापसी का टिकट
Integer
— ब्लू चैनल की वैल्यू.
getColorType()
इस रंग का टाइप पाएं.
वापसी का टिकट
ColorType
— रंग का टाइप.
getGreen()
इस रंग का ग्रीन चैनल, 0 से 255 के बीच की संख्या के तौर पर.
वापसी का टिकट
Integer
— ग्रीन चैनल की वैल्यू.
getRed()
इस रंग का लाल चैनल, 0 से 255 के बीच की संख्या के तौर पर.
वापसी का टिकट
Integer
— लाल चैनल की वैल्यू.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003e\u003ccode\u003eRgbColor\u003c/code\u003e defines a color using red, green, and blue color channels.\u003c/p\u003e\n"],["\u003cp\u003eYou can get the individual red, green, and blue color channel values as integers ranging from 0 to 255.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003easHexString()\u003c/code\u003e method provides the color's hexadecimal representation, suitable for CSS use.\u003c/p\u003e\n"],["\u003cp\u003eIt is possible to determine the color type using the \u003ccode\u003egetColorType()\u003c/code\u003e method.\u003c/p\u003e\n"]]],[],null,["# Class RgbColor\n\nRgbColor\n\nA color defined by red, green, blue color channels. \n\n### Methods\n\n| Method | Return type | Brief description |\n|-----------------------------------|-----------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------|\n| [asHexString()](#asHexString()) | `String` | Returns the color as a CSS-style 7 character hexadecimal string (#rrggbb) or 9 character hexadecimal string (#aarrggbb). |\n| [getBlue()](#getBlue()) | `Integer` | The blue channel of this color, as a number from 0 to 255. |\n| [getColorType()](#getColorType()) | [ColorType](/apps-script/reference/base/color-type) | Get the type of this color. |\n| [getGreen()](#getGreen()) | `Integer` | The green channel of this color, as a number from 0 to 255. |\n| [getRed()](#getRed()) | `Integer` | The red channel of this color, as a number from 0 to 255. |\n\nDetailed documentation\n----------------------\n\n### `as``Hex``String()`\n\nReturns the color as a CSS-style 7 character hexadecimal string (#rrggbb) or 9 character\nhexadecimal string (#aarrggbb).\n\n#### Return\n\n\n`String` --- The hex representation of color.\n\n*** ** * ** ***\n\n### `get``Blue()`\n\nThe blue channel of this color, as a number from 0 to 255.\n\n#### Return\n\n\n`Integer` --- The value of blue channel.\n\n*** ** * ** ***\n\n### `get``Color``Type()`\n\nGet the type of this color.\n\n#### Return\n\n\n[ColorType](/apps-script/reference/base/color-type) --- The color type.\n\n*** ** * ** ***\n\n### `get``Green()`\n\nThe green channel of this color, as a number from 0 to 255.\n\n#### Return\n\n\n`Integer` --- The value of green channel.\n\n*** ** * ** ***\n\n### `get``Red()`\n\nThe red channel of this color, as a number from 0 to 255.\n\n#### Return\n\n\n`Integer` --- The value of red channel."]]