Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

演算子とかプロパティとかに色を付けるかどうか #366

Closed
ufcpp opened this issue Oct 16, 2021 · 3 comments
Closed

演算子とかプロパティとかに色を付けるかどうか #366

ufcpp opened this issue Oct 16, 2021 · 3 comments

Comments

@ufcpp
Copy link
Owner

ufcpp commented Oct 16, 2021

うちのサイト中のソースコードの色付け、自作ツールを作ったので、配色とかの自由度が上がった。
https://github.com/ufcpp/RoslynCsharpToHtml

Visual Studio が標準テーマでは色付けしないやつ、例えば、

  • 演算子
  • ()
  • {}
  • プロパティ
  • (クラスと構造体を区別するなど)型の種類

にも原理的には色付けできる。

問題は配色をどうするか。これに関して意見募集したい。

@ufcpp
Copy link
Owner Author

ufcpp commented Jun 9, 2022

今のところの候補:

.type { color: #2ba6af; }
.reserved { color: #0000FF; }
.control { color: #8F08C4; }
.method { color: #74531F; }
.type { color: #2B91AF; }
.type.struct { color: #28a575; }
.string { color: #A31515; }
.variable { color: #2c2e55; }
.comment { color: #008000; }
.excluded { color: #686868; }
.preprocess { color: #686868; }
.number { color: #254370 }
.operator { color: #6b3480 }
.constant { color: #743131 }
.field { color: #383b74 }
.property { color: #27525a }

image

@ufcpp
Copy link
Owner Author

ufcpp commented Mar 21, 2023

.markdown-preview.markdown-preview {
    pre {
        border: 1px solid #ccf;
        font-size: 14px;
        font-family: "Cascadia Mono";
        line-height: 1.3em !important;
        padding: .2em;
        overflow: auto;
    }

    pre.console,
    pre.console code {
        color: #fff;
        margin: 1em 0;
        background-color: #606060;
        border: 1px solid transparent;
    }

    pre.console em,
    pre.console code em {
        color: #fff;
        background-color: #606060 !important;
        border-bottom: 1pt solid #ff8080 !important;
    }

    .warning {
        border-bottom: dotted medium #008000
    }

    .error {
        border-bottom: dotted medium #f00
    }

    .suggestion {
        opacity: .7
    }

    .static {
        font-weight: bold;
    }

    .reserved {
        color: #0000e1
    }

    .control {
        color: #8f08c4
    }

    .inactive {
        color: #808080
    }

    .comment {
        color: #008000
    }

    .type {
        color: #2b91af
    }

    .method {
        color: #74531F
    }

    .variable {
        color: #1f377f
    }

    .string {
        color: #a31515
    }

    .literal {
        color: #a52a2a
    }

    .input {
        color: #ff8030;
        font-weight: bold
    }

    .operator {
        color: #000080
    }

    .element {
        color: #a51410
    }

    .attribute {
        color: #f00
    }

    .attvalue {
        color: #00f
    }

    .bracket {
        color: #00f
    }

    .prompt {
        color: #60ff60
    }

    .console .comment {
        color: #ffa0a0
    }

    .version {
        display: flexbox;
        margin-left: 8px;
        border-left: 8px solid #b0b0c0;
        padding-left: 8px
    }

    .version2 {
        color: #f00;
        border-color: #cc8e8e
    }

    .version3 {
        color: #0a0;
        border-color: #adcc8e
    }

    .version4 {
        color: #a0a;
        border-color: #8ecccc
    }

    .version5 {
        color: #0aa;
        border-color: #ad8ecc
    }

    .version6 {
        color: #702080;
        border-color: #ccb266
    }

    .version7 {
        color: #702080;
        border-color: #66cc7f
    }

    .version7_1 {
        color: #702080;
        border-color: #66cc7f
    }

    .version7_2 {
        color: #702080;
        border-color: #66cc7f
    }

    .version7_3 {
        color: #702080;
        border-color: #66cc7f
    }

    .version8 {
        color: #48c;
        border-color: #48c
    }

    .version9 {
        color: #b4c;
        border-color: #b4c
    }

    .version10 {
        color: #ED4E4E;
        border-color: #ED4E4E
    }

    .version11 {
        color: #EEDD44;
        border-color: #EEDD44
    }
}

@ufcpp
Copy link
Owner Author

ufcpp commented Mar 21, 2023

それっぽく色付け。

@ufcpp ufcpp closed this as completed Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant