Title: Renders wrong colors · Issue #52 · JavaBWAPI/JBWAPI · GitHub
Open Graph Title: Renders wrong colors · Issue #52 · JavaBWAPI/JBWAPI
X Title: Renders wrong colors · Issue #52 · JavaBWAPI/JBWAPI
Description: I know BW is paletted with limited colors available, but the ones that are currently rendering are nevertheless incorrect (eg previously rendered as expected in BWMirror) Drawing gradients along RGB and HSV spectra: Top-left: Color(x, y,...
Open Graph Description: I know BW is paletted with limited colors available, but the ones that are currently rendering are nevertheless incorrect (eg previously rendered as expected in BWMirror) Drawing gradients along RG...
X Description: I know BW is paletted with limited colors available, but the ones that are currently rendering are nevertheless incorrect (eg previously rendered as expected in BWMirror) Drawing gradients along RG...
Opengraph URL: https://github.com/JavaBWAPI/JBWAPI/issues/52
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Renders wrong colors","articleBody":"I know BW is paletted with limited colors available, but the ones that are currently rendering are nevertheless incorrect (eg previously rendered as expected in BWMirror)\r\n\r\nDrawing gradients along RGB and HSV spectra:\r\n* Top-left: Color(x, y, 0)\r\n* Middle-left: Color(x, 0, y)\r\n* Bottom-left: Color(0, x, y)\r\n* Top-left: Color(x, y, 255)\r\n* Middle-left: Color(x, 255, y)\r\n* Bottom-left: Color(255, x, y)\r\n\r\n\r\n\r\n\r\nFull source: \r\n\r\n```\r\n def drawGradient(row: Int, column: Int, color: (Int, Int) =\u003e Color): Unit = {\r\n val origin = Pixel(264 * row, 264 * column)\r\n var i = 0\r\n val scale = 16\r\n while (i \u003c 256 / scale) {\r\n var j = 0\r\n while (j \u003c 256 / scale) {\r\n val start = origin.add(scale * i, scale * j)\r\n DrawMap.box(start, start.add(scale, scale), color(scale * i, scale * j), solid = true)\r\n j += 1\r\n }\r\n i += 1\r\n }\r\n }\r\n\r\n override def renderMap(): Unit = {\r\n drawGradient(0, 0, (x, y) =\u003e new Color(x, y, 0))\r\n drawGradient(0, 1, (x, y) =\u003e new Color(x, 0, y))\r\n drawGradient(0, 2, (x, y) =\u003e new Color(0, x, y))\r\n drawGradient(1, 0, (x, y) =\u003e new Color(x, y, 255))\r\n drawGradient(1, 1, (x, y) =\u003e new Color(x, 255, y))\r\n drawGradient(1, 2, (x, y) =\u003e new Color(255, x, y))\r\n drawGradient(2, 0, (x, y) =\u003e Colors.hsv(x, y, 255))\r\n drawGradient(2, 1, (x, y) =\u003e Colors.hsv(x, 255, y))\r\n drawGradient(2, 2, (x, y) =\u003e Colors.hsv(128, x, y))\r\n }\r\n}```\r\n","author":{"url":"https://github.com/dgant","@type":"Person","name":"dgant"},"datePublished":"2020-02-06T01:15:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/52/JBWAPI/issues/52"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b9287f5a-5372-a5b2-c99e-ac068a17e9f7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BB84:FF7AB:186191C:21A595D:69738B86 |
| html-safe-nonce | 808c5a93bd159b6bba404541c7836f16207efce6bb6944dbe62e56a3576e85c6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjg0OkZGN0FCOjE4NjE5MUM6MjFBNTk1RDo2OTczOEI4NiIsInZpc2l0b3JfaWQiOiIzMTAwODM0ODA0NTY4MTMyNDg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5566ec6e34b9e8a541ace07e2b0ab47f23928ce965bec641f277a518554bce3a |
| hovercard-subject-tag | issue:560721464 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaBWAPI/JBWAPI/52/issue_layout |
| twitter:image | https://opengraph.githubassets.com/765d35e3348b024c770cc8d4b3b3bc21faa09771b9cdd61676383815d8c990f0/JavaBWAPI/JBWAPI/issues/52 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/765d35e3348b024c770cc8d4b3b3bc21faa09771b9cdd61676383815d8c990f0/JavaBWAPI/JBWAPI/issues/52 |
| og:image:alt | I know BW is paletted with limited colors available, but the ones that are currently rendering are nevertheless incorrect (eg previously rendered as expected in BWMirror) Drawing gradients along RG... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dgant |
| hostname | github.com |
| expected-hostname | github.com |
| None | f0b5e2d1da32de5a0b7bcfbc5ba007c93e8e63098fba29e1200efb674aa72e66 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaBWAPI/JBWAPI git https://github.com/JavaBWAPI/JBWAPI.git |
| octolytics-dimension-user_id | 46279254 |
| octolytics-dimension-user_login | JavaBWAPI |
| octolytics-dimension-repository_id | 149718845 |
| octolytics-dimension-repository_nwo | JavaBWAPI/JBWAPI |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 149718845 |
| octolytics-dimension-repository_network_root_nwo | JavaBWAPI/JBWAPI |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c96653671324f9b6d4c5f787435acf56a06087dd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width