css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <aside class="sidebar">
  <h1>Sidebar</h1>
</aside> 

<section class="main">
  <header class="main-header">
    <h1>Header</h1>
  </header>

  <div class="main-body-wrapper">
    <article class="main-body">
      <h1>Main content</h1>

      <p>
        darktablethe photo workflow softwareMain menuSkip to primary contentSkip to secondary content
        news
        about
        blog
        install
        resources
        development
        contact
        the rainy cord chord, © 2011 Rostyslav Pidgornyi
        Post navigation← Previous Next →
        lmaskdtyellow
        Luminosity Masks in Darktable
        Posted on January 18, 2015 by Mueen Nawaz
        Pat David has a great blog on photoediting in GIMP. I recently read his post on luminosity masks and was fairly impressed. Can darktable do something similar? Yes - they're a special case of parametric masks.

        I thought I'd post a quick tutorial on luminosity masks using parametric masks. First, I strongly suggest you read Pat David's post and thoroughly understand what's going on.

        A quick and simplistic explanation follows: Normally, if we make a selection and, say, adjust the brightness dramatically in that selection, we get a sharp (and ugly) transition near the edge of the selection:
        sharpedge

        The quick solution is to blur the mask (feathering in GIMP). Feathering simply makes the transition less sharp:
        sharpedge1

        Better, but still too sharp a transition. You can feather it even more if you wish, but however much you feather it, the transition is determined too heavily by your choice of selection (a rectangle in this case). We'd really like is a way to select based on the actual contents of the image.

        What luminosity masks do is let you select regions in your image in proportion to their brightness. So the L layer in Pat's article fully selects completely bright pixels, and only partially selects pixels that are half as bright, and doesn't select pixels that are not bright at all. When you now brighten the image, the effect of the brightening is greatest on the brightest pixels, and least on the darkest pixels. There are no sharp transitions like what I have in my screenshots above.

        In that sense, some refer to these masks as self-feathering.

        So how can we do this in darktable?

        Consider the following image:
        baseimage

        Let's say I want to brighten it. Let me apply an aggressive curve:
      </p>
    </article>

    <aside class="secondary-sidebar">
      <h1>Secondary sidebar</h1>
    </aside>
  </div>

  <footer class="main-footer">
    <h1>Footer</h1>
  </footer>
</section>
            
          
!
            
              @import "lesshat";

@sidebar-width: 200px;
@sidebar-bgcolor: #FBE9D5;
@secondary-sidebar-width: 160px;
@secondary-sidebar-bgcolor: #EBDDF0;
@header-height: 50px;
@header-bgcolor: #FCF3CF;
@footer-height: 100px;
@footer-bgcolor: #fff;
@main-bgcolor: #D6EAF7;

* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
}

h1 {
  font-size: 1.3em;
}

body {
  display: table;
}

.sidebar {
  width: @sidebar-width;
  display: table-cell;
  background: @sidebar-bgcolor;
  padding: 2em;
  vertical-align: middle;
  text-align: center;
}

.main {
  position: relative;
  display: table-cell;
  background: @main-bgcolor;

}

.main-header {
  position: absolute;
  top: 0;
  width: 100%;
  background: @header-bgcolor;
  border-left: solid 2px #F2BE43;
  height: @header-height;
  vertical-align: middle;
  text-align: center;
}

.main-body-wrapper {
  padding-top: @header-height;
  padding-bottom: @footer-height;
  min-height: 100%;
  display: table;
}

  .main-body {
    display: table-cell;
    border-width: 2px;
    border-style: solid;
    border-top-color: #91BDBB;
    border-right-color: #82A8DD;
    border-bottom-color: #8FA8C8;
    border-left-color: #9AABAB;
    padding: 2em;
    vertical-align: top;
  }

  .secondary-sidebar {
    display: table-cell;
    width: @secondary-sidebar-width;
    background: #EBDDF0;
    border-top: solid 2px #C79CA8;
    border-bottom: solid 2px #C98BB4;
    padding: 2em;
    vertical-align: middle;
    text-align: center;
  }

.main-footer {
  background: #FADBD8;
  height: @footer-height;
  position: absolute;
  bottom: 0;
  width: 100%;
  border-left: solid 2px #F1A274;
  padding: 2em;
  vertical-align: middle;
  text-align: center;
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console