You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

334 lines
16 KiB

  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Class HexColorConverter
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class HexColorConverter
  11. ">
  12. <meta name="generator" content="docfx 2.56.2.0">
  13. <link rel="shortcut icon" href="../favicon.ico">
  14. <link rel="stylesheet" href="../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../styles/docfx.css">
  16. <link rel="stylesheet" href="../styles/main.css">
  17. <link rel="stylesheet" href="../styles/fix.css">
  18. <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
  19. <meta property="docfx:navrel" content="../toc.html">
  20. <meta property="docfx:tocrel" content="toc.html">
  21. <meta property="docfx:rel" content="../">
  22. <meta property="docfx:newtab" content="true">
  23. </head> <body data-spy="scroll" data-target="#affix" data-offset="120">
  24. <div id="wrapper">
  25. <header>
  26. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  27. <div class="container">
  28. <div class="navbar-header">
  29. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  30. <span class="sr-only">Toggle navigation</span>
  31. <span class="icon-bar"></span>
  32. <span class="icon-bar"></span>
  33. <span class="icon-bar"></span>
  34. </button>
  35. <a class="navbar-brand" href="../index.html">
  36. <img id="logo" class="svg" src="../logo.svg" alt="">
  37. </a>
  38. </div>
  39. <div class="collapse navbar-collapse" id="navbar">
  40. <form class="navbar-form navbar-right" role="search" id="search">
  41. <div class="form-group">
  42. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  43. </div>
  44. </form>
  45. </div>
  46. </div>
  47. </nav>
  48. <div class="subnav navbar navbar-default">
  49. <div class="container hide-when-search" id="breadcrumb">
  50. <ul class="breadcrumb">
  51. <li></li>
  52. </ul>
  53. </div>
  54. </div>
  55. </header>
  56. <div class="container body-content">
  57. <div id="search-results">
  58. <div class="search-list"></div>
  59. <div class="sr-items">
  60. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  61. </div>
  62. <ul id="pagination"></ul>
  63. </div>
  64. </div>
  65. <div role="main" class="container body-content hide-when-search">
  66. <div class="sidenav hide-when-search">
  67. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  68. <div class="sidetoggle collapse" id="sidetoggle">
  69. <div id="sidetoc"></div>
  70. </div>
  71. </div>
  72. <div class="article row grid-right">
  73. <div class="col-md-10">
  74. <article class="content wrap" id="_content" data-uid="IPA.Config.Stores.Converters.HexColorConverter">
  75. <h1 id="IPA_Config_Stores_Converters_HexColorConverter" data-uid="IPA.Config.Stores.Converters.HexColorConverter" class="text-break">Class HexColorConverter
  76. </h1>
  77. <div class="markdown level0 summary"><p>A converter for <span class="xref">UnityEngine.Color</span> objects.</p>
  78. </div>
  79. <div class="markdown level0 conceptual"></div>
  80. <div class="inheritance">
  81. <h5>Inheritance</h5>
  82. <div class="level0"><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object">Object</a></div>
  83. <div class="level1"><a class="xref" href="IPA.Config.Stores.ValueConverter-1.html">ValueConverter</a>&lt;<span class="xref">UnityEngine.Color</span>&gt;</div>
  84. <div class="level2"><span class="xref">HexColorConverter</span></div>
  85. </div>
  86. <div classs="implements">
  87. <h5>Implements</h5>
  88. <div><a class="xref" href="IPA.Config.Stores.IValueConverter.html">IValueConverter</a></div>
  89. </div>
  90. <div class="inheritedMembers">
  91. <h5>Inherited Members</h5>
  92. <div>
  93. <a class="xref" href="IPA.Config.Stores.ValueConverter-1.html#IPA_Config_Stores_ValueConverter_1_IPA_Config_Stores_IValueConverter_ToValue_System_Object_System_Object_">ValueConverter&lt;Color&gt;.IValueConverter.ToValue(Object, Object)</a>
  94. </div>
  95. <div>
  96. <a class="xref" href="IPA.Config.Stores.ValueConverter-1.html#IPA_Config_Stores_ValueConverter_1_IPA_Config_Stores_IValueConverter_FromValue_IPA_Config_Data_Value_System_Object_">ValueConverter&lt;Color&gt;.IValueConverter.FromValue(Value, Object)</a>
  97. </div>
  98. <div>
  99. <a class="xref" href="IPA.Config.Stores.ValueConverter-1.html#IPA_Config_Stores_ValueConverter_1_IPA_Config_Stores_IValueConverter_Type">ValueConverter&lt;Color&gt;.IValueConverter.Type</a>
  100. </div>
  101. <div>
  102. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.tostring#System_Object_ToString">Object.ToString()</a>
  103. </div>
  104. <div>
  105. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.equals#System_Object_Equals_System_Object_">Object.Equals(Object)</a>
  106. </div>
  107. <div>
  108. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.equals#System_Object_Equals_System_Object_System_Object_">Object.Equals(Object, Object)</a>
  109. </div>
  110. <div>
  111. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.referenceequals#System_Object_ReferenceEquals_System_Object_System_Object_">Object.ReferenceEquals(Object, Object)</a>
  112. </div>
  113. <div>
  114. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gethashcode#System_Object_GetHashCode">Object.GetHashCode()</a>
  115. </div>
  116. <div>
  117. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gettype#System_Object_GetType">Object.GetType()</a>
  118. </div>
  119. <div>
  120. <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.memberwiseclone#System_Object_MemberwiseClone">Object.MemberwiseClone()</a>
  121. </div>
  122. </div>
  123. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Config.Stores.Converters.html">IPA.Config.Stores.Converters</a></h6>
  124. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  125. <h5 id="IPA_Config_Stores_Converters_HexColorConverter_syntax">Syntax</h5>
  126. <div class="codewrapper">
  127. <pre><code class="lang-csharp hljs">public sealed class HexColorConverter : ValueConverter&lt;Color&gt;, IValueConverter</code></pre>
  128. </div>
  129. <h3 id="methods">Methods
  130. </h3>
  131. <span class="small pull-right mobile-hide">
  132. <span class="divider">|</span>
  133. <a href="https://github.com/bsmg/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Config_Stores_Converters_HexColorConverter_FromValue_IPA_Config_Data_Value_System_Object_.md&amp;value=---%0Auid%3A%20IPA.Config.Stores.Converters.HexColorConverter.FromValue(IPA.Config.Data.Value%2CSystem.Object)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  134. </span>
  135. <span class="small pull-right mobile-hide">
  136. <a href="https://github.com/bsmg/BeatSaber-IPA-Reloaded/blob/83e06645d5bfeafe8c4701ed4f05a0d1c2202bd9/IPA.Loader/Config/Stores/Converters.cs/#L503">View Source</a>
  137. </span>
  138. <a id="IPA_Config_Stores_Converters_HexColorConverter_FromValue_" data-uid="IPA.Config.Stores.Converters.HexColorConverter.FromValue*"></a>
  139. <h4 id="IPA_Config_Stores_Converters_HexColorConverter_FromValue_IPA_Config_Data_Value_System_Object_" data-uid="IPA.Config.Stores.Converters.HexColorConverter.FromValue(IPA.Config.Data.Value,System.Object)">FromValue(Value, Object)</h4>
  140. <div class="markdown level1 summary"><p>Converts a <a class="xref" href="IPA.Config.Data.Value.html">Value</a> that is a <a class="xref" href="IPA.Config.Data.Text.html">Text</a> node to the corresponding <span class="xref">UnityEngine.Color</span> object.</p>
  141. </div>
  142. <div class="markdown level1 conceptual"></div>
  143. <h5 class="decalaration">Declaration</h5>
  144. <div class="codewrapper">
  145. <pre><code class="lang-csharp hljs">public override Color FromValue(Value value, object parent)</code></pre>
  146. </div>
  147. <h5 class="parameters">Parameters</h5>
  148. <table class="table table-bordered table-striped table-condensed">
  149. <thead>
  150. <tr>
  151. <th>Type</th>
  152. <th>Name</th>
  153. <th>Description</th>
  154. </tr>
  155. </thead>
  156. <tbody>
  157. <tr>
  158. <td><a class="xref" href="IPA.Config.Data.Value.html">Value</a></td>
  159. <td><span class="parametername">value</span></td>
  160. <td><p>the <a class="xref" href="IPA.Config.Data.Value.html">Value</a> to convert</p>
  161. </td>
  162. </tr>
  163. <tr>
  164. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object">Object</a></td>
  165. <td><span class="parametername">parent</span></td>
  166. <td><p>the object which will own the created object</p>
  167. </td>
  168. </tr>
  169. </tbody>
  170. </table>
  171. <h5 class="returns">Returns</h5>
  172. <table class="table table-bordered table-striped table-condensed">
  173. <thead>
  174. <tr>
  175. <th>Type</th>
  176. <th>Description</th>
  177. </tr>
  178. </thead>
  179. <tbody>
  180. <tr>
  181. <td><span class="xref">UnityEngine.Color</span></td>
  182. <td><p>the deserialized Color object</p>
  183. </td>
  184. </tr>
  185. </tbody>
  186. </table>
  187. <h5 class="overrides">Overrides</h5>
  188. <div><span class="xref">IPA.Config.Stores.ValueConverter&lt;UnityEngine.Color&gt;.FromValue(IPA.Config.Data.Value, System.Object)</span></div>
  189. <h5 class="exceptions">Exceptions</h5>
  190. <table class="table table-bordered table-striped table-condensed">
  191. <thead>
  192. <tr>
  193. <th>Type</th>
  194. <th>Condition</th>
  195. </tr>
  196. </thead>
  197. <tbody>
  198. <tr>
  199. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></td>
  200. <td><p>if <code data-dev-comment-type="paramref" class="paramref">value</code> is not a <a class="xref" href="IPA.Config.Data.Text.html">Text</a> node or couldn&apos;t be parsed into a Color object</p>
  201. </td>
  202. </tr>
  203. </tbody>
  204. </table>
  205. <span class="small pull-right mobile-hide">
  206. <span class="divider">|</span>
  207. <a href="https://github.com/bsmg/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Config_Stores_Converters_HexColorConverter_ToValue_UnityEngine_Color_System_Object_.md&amp;value=---%0Auid%3A%20IPA.Config.Stores.Converters.HexColorConverter.ToValue(UnityEngine.Color%2CSystem.Object)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  208. </span>
  209. <span class="small pull-right mobile-hide">
  210. <a href="https://github.com/bsmg/BeatSaber-IPA-Reloaded/blob/83e06645d5bfeafe8c4701ed4f05a0d1c2202bd9/IPA.Loader/Config/Stores/Converters.cs/#L524">View Source</a>
  211. </span>
  212. <a id="IPA_Config_Stores_Converters_HexColorConverter_ToValue_" data-uid="IPA.Config.Stores.Converters.HexColorConverter.ToValue*"></a>
  213. <h4 id="IPA_Config_Stores_Converters_HexColorConverter_ToValue_UnityEngine_Color_System_Object_" data-uid="IPA.Config.Stores.Converters.HexColorConverter.ToValue(UnityEngine.Color,System.Object)">ToValue(Color, Object)</h4>
  214. <div class="markdown level1 summary"><p>Converts color of type <span class="xref">UnityEngine.Color</span> to a <a class="xref" href="IPA.Config.Data.Value.html">Value</a> node.</p>
  215. </div>
  216. <div class="markdown level1 conceptual"></div>
  217. <h5 class="decalaration">Declaration</h5>
  218. <div class="codewrapper">
  219. <pre><code class="lang-csharp hljs">public override Value ToValue(Color obj, object parent)</code></pre>
  220. </div>
  221. <h5 class="parameters">Parameters</h5>
  222. <table class="table table-bordered table-striped table-condensed">
  223. <thead>
  224. <tr>
  225. <th>Type</th>
  226. <th>Name</th>
  227. <th>Description</th>
  228. </tr>
  229. </thead>
  230. <tbody>
  231. <tr>
  232. <td><span class="xref">UnityEngine.Color</span></td>
  233. <td><span class="parametername">obj</span></td>
  234. <td><p>the object to serialize</p>
  235. </td>
  236. </tr>
  237. <tr>
  238. <td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object">Object</a></td>
  239. <td><span class="parametername">parent</span></td>
  240. <td><p>the object which owns <code data-dev-comment-type="paramref" class="paramref">obj</code></p>
  241. </td>
  242. </tr>
  243. </tbody>
  244. </table>
  245. <h5 class="returns">Returns</h5>
  246. <table class="table table-bordered table-striped table-condensed">
  247. <thead>
  248. <tr>
  249. <th>Type</th>
  250. <th>Description</th>
  251. </tr>
  252. </thead>
  253. <tbody>
  254. <tr>
  255. <td><a class="xref" href="IPA.Config.Data.Value.html">Value</a></td>
  256. <td><p>a <a class="xref" href="IPA.Config.Data.Text.html">Text</a> node representing <code data-dev-comment-type="paramref" class="paramref">obj</code></p>
  257. </td>
  258. </tr>
  259. </tbody>
  260. </table>
  261. <h5 class="overrides">Overrides</h5>
  262. <div><span class="xref">IPA.Config.Stores.ValueConverter&lt;UnityEngine.Color&gt;.ToValue(UnityEngine.Color, System.Object)</span></div>
  263. <h3 id="implements">Implements</h3>
  264. <div>
  265. <a class="xref" href="IPA.Config.Stores.IValueConverter.html">IValueConverter</a>
  266. </div>
  267. <h3 id="extensionmethods">Extension Methods</h3>
  268. <div>
  269. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_SetField__2___0_System_String___1_">ReflectionUtil.SetField&lt;T, U&gt;(T, String, U)</a>
  270. </div>
  271. <div>
  272. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_GetField__2___1_System_String_">ReflectionUtil.GetField&lt;U, T&gt;(T, String)</a>
  273. </div>
  274. <div>
  275. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_SetProperty__2___0_System_String___1_">ReflectionUtil.SetProperty&lt;T, U&gt;(T, String, U)</a>
  276. </div>
  277. <div>
  278. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_GetProperty__2___1_System_String_">ReflectionUtil.GetProperty&lt;U, T&gt;(T, String)</a>
  279. </div>
  280. <div>
  281. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_InvokeMethod__2___1_System_String_System_Object___">ReflectionUtil.InvokeMethod&lt;U, T&gt;(T, String, Object[])</a>
  282. </div>
  283. </article>
  284. </div>
  285. <div class="hidden-sm col-md-2" role="complementary">
  286. <div class="sideaffix">
  287. <div class="contribution">
  288. <ul class="nav">
  289. <li>
  290. <a href="https://github.com/bsmg/BeatSaber-IPA-Reloaded/new/master/docs/override/new?filename=IPA_Config_Stores_Converters_HexColorConverter.md&amp;value=---%0Auid%3A%20IPA.Config.Stores.Converters.HexColorConverter%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
  291. </li>
  292. <li>
  293. <a href="https://github.com/bsmg/BeatSaber-IPA-Reloaded/blob/83e06645d5bfeafe8c4701ed4f05a0d1c2202bd9/IPA.Loader/Config/Stores/Converters.cs/#L494" class="contribution-link">View Source</a>
  294. </li>
  295. </ul>
  296. </div>
  297. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  298. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  299. </nav>
  300. </div>
  301. </div>
  302. </div>
  303. </div>
  304. <footer>
  305. <div class="grad-bottom"></div>
  306. <div class="footer">
  307. <div class="container">
  308. <span class="pull-right">
  309. <a href="#top">Back to top</a>
  310. </span>
  311. <span>Generated by <strong>DocFX</strong></span>
  312. </div>
  313. </div>
  314. </footer>
  315. </div>
  316. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  317. <script type="text/javascript" src="../styles/docfx.js"></script>
  318. <script type="text/javascript" src="../styles/main.js"></script>
  319. </body>
  320. </html>