संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
blockly > utils > colour > rgbToHex
utils.color.ggToHex() फ़ंक्शन
किसी रंग को आरजीबी से हेक्स दिखाने में बदलता है.
हस्ताक्षर:
export declare function rgbToHex(r: number, g: number, b: number): string;
पैरामीटर
पैरामीटर |
टाइप |
ब्यौरा |
r |
संख्या |
लाल रंग की मात्रा, पूर्णांक 0 और 255 के बीच. |
g |
संख्या |
हरे रंग की मात्रा, पूर्णांक 0 से 255 के बीच. |
b |
संख्या |
नीले रंग की मात्रा, 0 से 255 के बीच की कोई संख्या. |
लौटाए जाने वाले प्रॉडक्ट:
स्ट्रिंग
रंग को हेक्स तरीके से दिखाना.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[],["The `rgbToHex` function converts a color from RGB to its hexadecimal representation. It takes three numerical parameters: `r` (red), `g` (green), and `b` (blue), each representing the amount of their respective color components, ranging from 0 to 255. The function then returns a string representing the color in hexadecimal format. The function is found within the blockly.utils.colour namespace.\n"]]